From abbfae739cab948cf5c9d7bf124b0427b9377d6f Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Wed, 22 Apr 2020 17:22:36 -0500 Subject: [PATCH] Removal of the codegen --- .gitignore | 3 - .../users/registrations_controller.rb | 9 +- app/javascript/page_info.js.erb | 5 + docker/build/Dockerfile | 2 - docker/debug/Dockerfile | 2 - javascripts/api/api/NonprofitsApi.ts | 197 +++++++++++++ javascripts/api/api/UsersApi.ts | 123 +++++++++ javascripts/api/api/api.ts | 5 + .../api/configuration.ts | 0 javascripts/api/index.ts | 3 + javascripts/api/model/Nonprofit.ts | 36 +++ javascripts/api/model/PostNonprofit.ts | 36 +++ .../api/model/PostNonprofitNonprofit.ts | 72 +++++ javascripts/api/model/PostNonprofitUser.ts | 54 ++++ javascripts/api/model/PostUser.ts | 24 ++ javascripts/api/model/ValidationError.ts | 42 +++ javascripts/api/model/ValidationErrors.ts | 39 +++ javascripts/api/model/models.ts | 7 + .../registration_page/RegistrationWizard.tsx | 28 +- lib/swagger-typescript-jquery/README.mustache | 45 --- lib/swagger-typescript-jquery/api.mustache | 260 ------------------ lib/swagger-typescript-jquery/apis.mustache | 9 - .../git_push.sh.mustache | 52 ---- lib/swagger-typescript-jquery/index.mustache | 4 - .../licenseInfo.mustache | 11 - .../masterApiEntry.mustache | 0 lib/swagger-typescript-jquery/model.mustache | 13 - .../modelEnum.mustache | 12 - .../modelGeneric.mustache | 45 --- lib/swagger-typescript-jquery/models.mustache | 5 - .../package.mustache | 23 -- .../tsconfig.mustache | 18 -- .../typings.mustache | 10 - .../variables.mustache | 7 - lib/tasks/settings.rake | 21 -- package.json | 9 +- script/build.sh | 20 -- script/build/debian/java.sh | 4 - script/download_codegen_cli.sh | 6 - swagger.json | 3 - 40 files changed, 671 insertions(+), 593 deletions(-) create mode 100644 app/javascript/page_info.js.erb create mode 100644 javascripts/api/api/NonprofitsApi.ts create mode 100644 javascripts/api/api/UsersApi.ts create mode 100644 javascripts/api/api/api.ts rename lib/swagger-typescript-jquery/configuration.mustache => javascripts/api/configuration.ts (100%) create mode 100644 javascripts/api/index.ts create mode 100644 javascripts/api/model/Nonprofit.ts create mode 100644 javascripts/api/model/PostNonprofit.ts create mode 100644 javascripts/api/model/PostNonprofitNonprofit.ts create mode 100644 javascripts/api/model/PostNonprofitUser.ts create mode 100644 javascripts/api/model/PostUser.ts create mode 100644 javascripts/api/model/ValidationError.ts create mode 100644 javascripts/api/model/ValidationErrors.ts create mode 100644 javascripts/api/model/models.ts delete mode 100644 lib/swagger-typescript-jquery/README.mustache delete mode 100644 lib/swagger-typescript-jquery/api.mustache delete mode 100644 lib/swagger-typescript-jquery/apis.mustache delete mode 100755 lib/swagger-typescript-jquery/git_push.sh.mustache delete mode 100644 lib/swagger-typescript-jquery/index.mustache delete mode 100644 lib/swagger-typescript-jquery/licenseInfo.mustache delete mode 100644 lib/swagger-typescript-jquery/masterApiEntry.mustache delete mode 100644 lib/swagger-typescript-jquery/model.mustache delete mode 100644 lib/swagger-typescript-jquery/modelEnum.mustache delete mode 100644 lib/swagger-typescript-jquery/modelGeneric.mustache delete mode 100644 lib/swagger-typescript-jquery/models.mustache delete mode 100644 lib/swagger-typescript-jquery/package.mustache delete mode 100644 lib/swagger-typescript-jquery/tsconfig.mustache delete mode 100644 lib/swagger-typescript-jquery/typings.mustache delete mode 100644 lib/swagger-typescript-jquery/variables.mustache delete mode 100755 script/build.sh delete mode 100755 script/build/debian/java.sh delete mode 100755 script/download_codegen_cli.sh delete mode 100644 swagger.json diff --git a/.gitignore b/.gitignore index c809d1c3..1c56e3ff 100755 --- a/.gitignore +++ b/.gitignore @@ -48,9 +48,6 @@ config/environments/*.local.yml #local bins we use for builds .bin -#generated typescript APIs from Grape -javascripts/api - # thing we want to keep in public !public/*.html !public/maintenance.html diff --git a/app/controllers/users/registrations_controller.rb b/app/controllers/users/registrations_controller.rb index 1f516e7a..c697853d 100644 --- a/app/controllers/users/registrations_controller.rb +++ b/app/controllers/users/registrations_controller.rb @@ -10,8 +10,8 @@ class Users::RegistrationsController < Devise::RegistrationsController # this endpoint only creates donor users def create - params[:user][:referer] = session[:referer_id] - user = User.register_donor!(params[:user]) + clean_params[:user][:referer] = session[:referer_id] + user = User.register_donor!(clean_params[:user]) if user.save sign_in user render json: user @@ -51,4 +51,9 @@ class Users::RegistrationsController < Devise::RegistrationsController render json: { errors: errs }, status: :unprocessable_entity end end + + private + def clean_params + params.permit(:user => [:name, :email, :password_confirmation, :password]) + end end diff --git a/app/javascript/page_info.js.erb b/app/javascript/page_info.js.erb new file mode 100644 index 00000000..dba524ba --- /dev/null +++ b/app/javascript/page_info.js.erb @@ -0,0 +1,5 @@ +const pageInfo = { + apiDomain: '<%= Settings.api_domain.url %>' +} + +module.exports = pageInfo; \ No newline at end of file diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index df535878..3560db1a 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -7,8 +7,6 @@ COPY script/build/debian/node.sh myapp/script/build/debian/node.sh RUN myapp/script/build/debian/node.sh COPY script/build/debian/postgres.sh myapp/script/build/debian/postgres.sh RUN myapp/script/build/debian/postgres.sh -COPY script/build/debian/java.sh myapp/script/build/debian/java.sh -RUN myapp/script/build/debian/java.sh COPY gems /myapp/gems/ WORKDIR /myapp COPY Gemfile /myapp/Gemfile diff --git a/docker/debug/Dockerfile b/docker/debug/Dockerfile index 86df341e..27146c2b 100644 --- a/docker/debug/Dockerfile +++ b/docker/debug/Dockerfile @@ -7,8 +7,6 @@ COPY script/build/debian/node.sh myapp/script/build/debian/node.sh RUN myapp/script/build/debian/node.sh COPY script/build/debian/postgres.sh myapp/script/build/debian/postgres.sh RUN myapp/script/build/debian/postgres.sh -COPY script/build/debian/java.sh myapp/script/build/debian/java.sh -RUN myapp/script/build/debian/java.sh COPY gems /myapp/gems/ WORKDIR /myapp COPY Gemfile /myapp/Gemfile diff --git a/javascripts/api/api/NonprofitsApi.ts b/javascripts/api/api/NonprofitsApi.ts new file mode 100644 index 00000000..0bcce87c --- /dev/null +++ b/javascripts/api/api/NonprofitsApi.ts @@ -0,0 +1,197 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +import * as $ from 'jquery'; +import * as models from '../model/models'; +import { Configuration } from '../configuration'; + +const page_info = require('../../../app/javascript/page_info.js.erb') + +/* tslint:disable:no-unused-variable member-ordering */ + + + + +export class NonprofitsApi { + protected basePath = `${page_info.apiDomain}/api`; + public defaultHeaders: Array = []; + public defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings = null; + public configuration: Configuration = new Configuration(); + + constructor(basePath?: string, configuration?: Configuration, defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings) { + if (basePath) { + this.basePath = basePath; + } + if (configuration) { + this.configuration = configuration; + } + if (defaultExtraJQueryAjaxSettings) { + this.defaultExtraJQueryAjaxSettings = defaultExtraJQueryAjaxSettings; + } + } + + private extendObj(objA: T2, objB: T2): T1|T2 { + for (let key in objB) { + if (objB.hasOwnProperty(key)) { + objA[key] = objB[key]; + } + } + return objA; + } + + + /** + * Return a nonprofit. + * @summary Return a nonprofit. + * @param id Status id. + */ + public getNonprofitId(id: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise { + let localVarPath = this.basePath + '/nonprofit/{id}'.replace('{' + 'id' + '}', encodeURIComponent(String(id))); + + let queryParameters: any = {}; + let headerParams: any = {}; + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getNonprofitId.'); + } + + + localVarPath = localVarPath + "?" + $.param(queryParameters); + // to determine the Content-Type header + let consumes: string[] = [ + ]; + + // to determine the Accept header + let produces: string[] = [ + 'application/json' + ]; + + + let requestOptions: JQueryAjaxSettings = { + url: localVarPath, + type: 'GET', + headers: headerParams, + processData: false + }; + + if (headerParams['Content-Type']) { + requestOptions.contentType = headerParams['Content-Type']; + } + + if (extraJQueryAjaxSettings) { + requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); + } + + if (this.defaultExtraJQueryAjaxSettings) { + requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); + } + + let dfd = $.Deferred(); + $.ajax(requestOptions).then( + (data: models.Nonprofit, textStatus: string, jqXHR: JQueryXHR) => + dfd.resolve(jqXHR, data), + (xhr: JQueryXHR, textStatus: string, errorThrown: string) => { + if(false){} + else if (xhr.status == 200 && 200 >= 400) + { + dfd.reject(new models.NonprofitException(xhr.responseJSON)) + } + + else + { + + dfd.reject(errorThrown) + } + } + ); + return dfd.promise(); + } + + + /** + * Register a nonprofit + * @summary Register a nonprofit + * @param Nonprofit + */ + public postNonprofit(Nonprofit: models.PostNonprofit, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise { + let localVarPath = this.basePath + '/nonprofits'; + + let queryParameters: any = {}; + let headerParams: any = {}; + // verify required parameter 'Nonprofit' is not null or undefined + if (Nonprofit === null || Nonprofit === undefined) { + throw new Error('Required parameter Nonprofit was null or undefined when calling postNonprofit.'); + } + + + localVarPath = localVarPath + "?" + $.param(queryParameters); + // to determine the Content-Type header + let consumes: string[] = [ + 'application/json' + ]; + + // to determine the Accept header + let produces: string[] = [ + 'application/json' + ]; + + + headerParams['Content-Type'] = 'application/json'; + + let requestOptions: JQueryAjaxSettings = { + url: localVarPath, + type: 'POST', + headers: headerParams, + processData: false + }; + + requestOptions.data = JSON.stringify(Nonprofit); + if (headerParams['Content-Type']) { + requestOptions.contentType = headerParams['Content-Type']; + } + + if (extraJQueryAjaxSettings) { + requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); + } + + if (this.defaultExtraJQueryAjaxSettings) { + requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); + } + + let dfd = $.Deferred(); + $.ajax(requestOptions).then( + (data: models.Nonprofit, textStatus: string, jqXHR: JQueryXHR) => + dfd.resolve(jqXHR, data), + (xhr: JQueryXHR, textStatus: string, errorThrown: string) => { + if(false){} + else if (xhr.status == 201 && 201 >= 400) + { + dfd.reject(new models.NonprofitException(xhr.responseJSON)) + } + + else if (xhr.status == 400 && 400 >= 400) + { + dfd.reject(new models.ValidationErrorsException(xhr.responseJSON)) + } + + else + { + + dfd.reject(errorThrown) + } + } + ); + return dfd.promise(); + } + +} diff --git a/javascripts/api/api/UsersApi.ts b/javascripts/api/api/UsersApi.ts new file mode 100644 index 00000000..cb2e00dc --- /dev/null +++ b/javascripts/api/api/UsersApi.ts @@ -0,0 +1,123 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +import * as $ from 'jquery'; +import * as models from '../model/models'; +import { Configuration } from '../configuration'; + +const page_info = require('../../../app/javascript/page_info.js.erb') + +/* tslint:disable:no-unused-variable member-ordering */ + + + + +export class UsersApi { + protected basePath = `${page_info.apiDomain}`; + public defaultHeaders: Array = []; + public defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings = null; + public configuration: Configuration = new Configuration(); + + constructor(basePath?: string, configuration?: Configuration, defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings) { + if (basePath) { + this.basePath = basePath; + } + if (configuration) { + this.configuration = configuration; + } + if (defaultExtraJQueryAjaxSettings) { + this.defaultExtraJQueryAjaxSettings = defaultExtraJQueryAjaxSettings; + } + } + + private extendObj(objA: T2, objB: T2): T1|T2 { + for (let key in objB) { + if (objB.hasOwnProperty(key)) { + objA[key] = objB[key]; + } + } + return objA; + } + + + /** + * Register a nonprofit + * @summary Register a nonprofit + * @param Nonprofit + */ + public postUser(User: models.PostUser, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise { + let localVarPath = this.basePath + '/users'; + + let queryParameters: any = {}; + let headerParams: any = {}; + // verify required parameter 'Nonprofit' is not null or undefined + if (User === null || User === undefined) { + throw new Error('Required parameter Nonprofit was null or undefined when calling postNonprofit.'); + } + + + localVarPath = localVarPath + "?" + $.param(queryParameters); + // to determine the Content-Type header + let consumes: string[] = [ + 'application/json' + ]; + + // to determine the Accept header + let produces: string[] = [ + 'application/json' + ]; + + + headerParams['Content-Type'] = 'application/json'; + + let requestOptions: JQueryAjaxSettings = { + url: localVarPath, + type: 'POST', + headers: headerParams, + processData: false + }; + + requestOptions.data = JSON.stringify(User); + if (headerParams['Content-Type']) { + requestOptions.contentType = headerParams['Content-Type']; + } + + if (extraJQueryAjaxSettings) { + requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); + } + + if (this.defaultExtraJQueryAjaxSettings) { + requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); + } + + let dfd = $.Deferred(); + $.ajax(requestOptions).then( + (data: any, textStatus: string, jqXHR: JQueryXHR) => + dfd.resolve(jqXHR, data), + (xhr: JQueryXHR, textStatus: string, errorThrown: string) => { + if (xhr.status == 422) + { + dfd.reject(new models.ValidationErrorsException(xhr.responseJSON)) + } + + else + { + + dfd.reject(errorThrown) + } + } + ); + return dfd.promise(); + } + +} diff --git a/javascripts/api/api/api.ts b/javascripts/api/api/api.ts new file mode 100644 index 00000000..2c3cb78e --- /dev/null +++ b/javascripts/api/api/api.ts @@ -0,0 +1,5 @@ +export * from './NonprofitsApi'; +export * from './UsersApi'; +import { NonprofitsApi } from './NonprofitsApi'; +import { UsersApi } from './UsersApi'; +export const APIS = [NonprofitsApi, UsersApi]; diff --git a/lib/swagger-typescript-jquery/configuration.mustache b/javascripts/api/configuration.ts similarity index 100% rename from lib/swagger-typescript-jquery/configuration.mustache rename to javascripts/api/configuration.ts diff --git a/javascripts/api/index.ts b/javascripts/api/index.ts new file mode 100644 index 00000000..2ecff6bd --- /dev/null +++ b/javascripts/api/index.ts @@ -0,0 +1,3 @@ +export * from './api/api'; +export * from './model/models'; +export * from './configuration'; \ No newline at end of file diff --git a/javascripts/api/model/Nonprofit.ts b/javascripts/api/model/Nonprofit.ts new file mode 100644 index 00000000..9ff50643 --- /dev/null +++ b/javascripts/api/model/Nonprofit.ts @@ -0,0 +1,36 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +/** + * Return a nonprofit. + */ +export interface Nonprofit { + id?: string; + +} +export class NonprofitException implements Error{ + + constructor(obj:Nonprofit, message?:string){ + this.item = obj; + + } + + message: string; + stack: string; + name: string; + + item: Nonprofit; +} + + diff --git a/javascripts/api/model/PostNonprofit.ts b/javascripts/api/model/PostNonprofit.ts new file mode 100644 index 00000000..616161e1 --- /dev/null +++ b/javascripts/api/model/PostNonprofit.ts @@ -0,0 +1,36 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +/** + * Register a nonprofit + */ +export interface PostNonprofit extends models.PostNonprofitNonprofit { + +} +export class PostNonprofitException implements Error{ + + constructor(obj:PostNonprofit, message?:string){ + this.item = obj; + this.item = obj; + + } + + message: string; + stack: string; + name: string; + + item: PostNonprofit; +} + + diff --git a/javascripts/api/model/PostNonprofitNonprofit.ts b/javascripts/api/model/PostNonprofitNonprofit.ts new file mode 100644 index 00000000..1b84fccb --- /dev/null +++ b/javascripts/api/model/PostNonprofitNonprofit.ts @@ -0,0 +1,72 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +export interface PostNonprofitNonprofit { + /** + * Organization Name + */ + name: string; + + /** + * Organization website URL + */ + website?: string; + + /** + * Organization Address ZIP Code + */ + zip_code: string; + + /** + * Organization Address State Code + */ + state_code: string; + + /** + * Organization Address City + */ + city: string; + + /** + * Organization email (public) + */ + email?: string; + + /** + * Organization phone (public) + */ + phone?: string; + +} +export class PostNonprofitNonprofitException implements Error{ + + constructor(obj:PostNonprofitNonprofit, message?:string){ + this.item = obj; + this.item = obj; + this.item = obj; + this.item = obj; + this.item = obj; + this.item = obj; + this.item = obj; + + } + + message: string; + stack: string; + name: string; + + item: PostNonprofitNonprofit; +} + + diff --git a/javascripts/api/model/PostNonprofitUser.ts b/javascripts/api/model/PostNonprofitUser.ts new file mode 100644 index 00000000..0a1e7358 --- /dev/null +++ b/javascripts/api/model/PostNonprofitUser.ts @@ -0,0 +1,54 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +export interface PostNonprofitUser { + /** + * Full name + */ + name: string; + + /** + * Username + */ + email: string; + + /** + * Password + */ + password: string; + + /** + * Password confirmation + */ + password_confirmation: string; + +} +export class PostNonprofitUserException implements Error{ + + constructor(obj:PostNonprofitUser, message?:string){ + this.item = obj; + this.item = obj; + this.item = obj; + this.item = obj; + + } + + message: string; + stack: string; + name: string; + + item: PostNonprofitUser; +} + + diff --git a/javascripts/api/model/PostUser.ts b/javascripts/api/model/PostUser.ts new file mode 100644 index 00000000..39e37d7f --- /dev/null +++ b/javascripts/api/model/PostUser.ts @@ -0,0 +1,24 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +/** + * Register a nonprofit + */ +export interface PostUser { + + user?: models.PostNonprofitUser; + +} + + diff --git a/javascripts/api/model/ValidationError.ts b/javascripts/api/model/ValidationError.ts new file mode 100644 index 00000000..dfdcbf5c --- /dev/null +++ b/javascripts/api/model/ValidationError.ts @@ -0,0 +1,42 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +export interface ValidationError { + /** + * Params where the following had an error. + */ + params?: Array; + + /** + * The validation messages for the params + */ + messages?: Array; + +} +export class ValidationErrorException implements Error{ + + constructor(obj:ValidationError, message?:string){ + this.item = obj; + this.item = obj; + + } + + message: string; + stack: string; + name: string; + + item: ValidationError; +} + + diff --git a/javascripts/api/model/ValidationErrors.ts b/javascripts/api/model/ValidationErrors.ts new file mode 100644 index 00000000..13bb42a4 --- /dev/null +++ b/javascripts/api/model/ValidationErrors.ts @@ -0,0 +1,39 @@ +/** + * API title + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +/** + * Register a nonprofit + */ +export interface ValidationErrors { + /** + * errors + */ + errors?: Array; + +} +export class ValidationErrorsException implements Error{ + + constructor(obj:ValidationErrors, message?:string){ + this.item = obj; + + } + + message: string; + stack: string; + name: string; + + item: ValidationErrors; +} + + diff --git a/javascripts/api/model/models.ts b/javascripts/api/model/models.ts new file mode 100644 index 00000000..b871d490 --- /dev/null +++ b/javascripts/api/model/models.ts @@ -0,0 +1,7 @@ +export * from './Nonprofit'; +export * from './PostNonprofit'; +export * from './PostNonprofitNonprofit'; +export * from './PostNonprofitUser'; +export * from './PostUser'; +export * from './ValidationError'; +export * from './ValidationErrors'; diff --git a/javascripts/src/components/registration_page/RegistrationWizard.tsx b/javascripts/src/components/registration_page/RegistrationWizard.tsx index 6abd2223..3eef62fd 100644 --- a/javascripts/src/components/registration_page/RegistrationWizard.tsx +++ b/javascripts/src/components/registration_page/RegistrationWizard.tsx @@ -12,9 +12,12 @@ import {WizardState, WizardTabPanelState} from "../common/wizard/wizard_state"; import UserInfoPanel, * as UserInfo from "./UserInfoPanel"; import { Nonprofit, - NonprofitApi, + NonprofitsApi, PostNonprofit, - ValidationErrorsException + ValidationErrorsException, + UsersApi, + PostUser, + PostNonprofitUser } from "../../../api"; import {initializationDefinition} from "../../../../types/mobx-react-form"; @@ -36,16 +39,22 @@ const setTourCookies = (nonprofit:Nonprofit) => { document.cookie = `tour_supporters=${nonprofit.id};path=/` document.cookie = `tour_subscribers=${nonprofit.id};path=/` } +/** this is just here to allow compilation. */ +interface TemporaryHackyInterface { + nonprofit: PostNonprofit + user: PostNonprofitUser +} export class RegistrationPageForm extends HoudiniForm { - converter: StaticFormToErrorAndBackConverter + converter: StaticFormToErrorAndBackConverter constructor(definition: initializationDefinition, options?: any) { super(definition, options) - this.converter = new StaticFormToErrorAndBackConverter(this.inputToForm) + this.converter = new StaticFormToErrorAndBackConverter(this.inputToForm) } - nonprofitApi: NonprofitApi + nonprofitApi: NonprofitsApi + usersApi: UsersApi signinApi: WebUserSignInOut options() { @@ -78,9 +87,11 @@ export class RegistrationPageForm extends HoudiniForm { try { - let r = await this.nonprofitApi.postNonprofit(input) + const userMessage = {user: input.user} + let user = await this.usersApi.postUser(userMessage) + this.signinApi.postLogin({email: input.user.email, password: input.user.password}) + let r = await this.nonprofitApi.postNonprofit(input.nonprofit) setTourCookies(r) - await this.signinApi.postLogin({email: input.user.email, password: input.user.password}) window.location.href = `/nonprofits/${r.id}/dashboard` } @@ -155,8 +166,9 @@ export class InnerRegistrationWizard extends React.Component { - this.form.nonprofitApi = this.props.ApiManager.get(NonprofitApi) + this.form.nonprofitApi = this.props.ApiManager.get(NonprofitsApi) this.form.signinApi = this.props.ApiManager.get(WebUserSignInOut) + this.form.usersApi = this.props.ApiManager.get(UsersApi) }) } diff --git a/lib/swagger-typescript-jquery/README.mustache b/lib/swagger-typescript-jquery/README.mustache deleted file mode 100644 index 31fe0fd5..00000000 --- a/lib/swagger-typescript-jquery/README.mustache +++ /dev/null @@ -1,45 +0,0 @@ -## {{npmName}}@{{npmVersion}} - -This generator creates TypeScript/JavaScript client that utilizes [jQuery](https://jquery.com/). The generated Node module can be used in the following environments: - -Environment -* Node.js -* Webpack -* Browserify - -Language level -* ES5 - you must have a Promises/A+ library installed -* ES6 - -Module system -* CommonJS -* ES6 module system - -It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) - -### Building - -To build an compile the typescript sources to javascript use: -``` -npm install -npm run build -``` - -### Publishing - -First build the package then run ```npm publish``` - -### Consuming - -navigate to the folder of your consuming project and run one of the following commands. - -_published:_ - -``` -npm install {{npmName}}@{{npmVersion}} --save -``` - -_unPublished (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE --save diff --git a/lib/swagger-typescript-jquery/api.mustache b/lib/swagger-typescript-jquery/api.mustache deleted file mode 100644 index c0935b36..00000000 --- a/lib/swagger-typescript-jquery/api.mustache +++ /dev/null @@ -1,260 +0,0 @@ -{{>licenseInfo}} - -{{#jqueryAlreadyImported}} -declare var $ : any; -{{/jqueryAlreadyImported}} -{{^jqueryAlreadyImported}} -import * as $ from 'jquery'; -{{/jqueryAlreadyImported}} -import * as models from '../model/models'; -import { COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - -/* tslint:disable:no-unused-variable member-ordering */ - -{{#operations}} - - - -{{#description}} -/** - * {{&description}} - */ -{{/description}} -export class {{classname}} { - protected basePath = '{{{basePath}}}'; - public defaultHeaders: Array = []; - public defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings = null; - public configuration: Configuration = new Configuration(); - - constructor(basePath?: string, configuration?: Configuration, defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings) { - if (basePath) { - this.basePath = basePath; - } - if (configuration) { - this.configuration = configuration; - } - if (defaultExtraJQueryAjaxSettings) { - this.defaultExtraJQueryAjaxSettings = defaultExtraJQueryAjaxSettings; - } - } - - private extendObj(objA: T2, objB: T2): T1|T2 { - for (let key in objB) { - if (objB.hasOwnProperty(key)) { - objA[key] = objB[key]; - } - } - return objA; - } - -{{#operation}} - - /** - * {{¬es}} - {{#summary}} - * @summary {{&summary}} - {{/summary}} - {{#allParams}} - * @param {{paramName}} {{description}} - {{/allParams}} - */ - public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}any{{/returnType}} > { - let localVarPath = this.basePath + '{{{path}}}'{{#pathParams}}.replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; - - let queryParameters: any = {}; - let headerParams: any = {}; -{{#hasFormParams}} - let formParams = new FormData(); - let reqHasFile = false; - -{{/hasFormParams}} -{{#allParams}} -{{#required}} - // verify required parameter '{{paramName}}' is not null or undefined - if ({{paramName}} === null || {{paramName}} === undefined) { - throw new Error('Required parameter {{paramName}} was null or undefined when calling {{nickname}}.'); - } - -{{/required}} -{{/allParams}} -{{#queryParams}} - {{#isListContainer}} - if ({{paramName}}) { - {{#isCollectionFormatMulti}} - {{paramName}}.forEach((element: any) => { - queryParameters['{{baseName}}'].push(element); - }); - {{/isCollectionFormatMulti}} - {{^isCollectionFormatMulti}} - queryParameters['{{baseName}}'] = {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']); - {{/isCollectionFormatMulti}} - } - {{/isListContainer}} - {{^isListContainer}} - if ({{paramName}} !== null && {{paramName}} !== undefined) { - {{#isDateTime}} - queryParameters['{{baseName}}'] = {{paramName}}.toISOString(); - {{/isDateTime}} - {{^isDateTime}} - {{#isDate}} - queryParameters['{{baseName}}'] = {{paramName}}.toISOString(); - {{/isDate}} - {{^isDate}} - queryParameters['{{baseName}}'] = {{paramName}}; - {{/isDate}} - {{/isDateTime}} - } - {{/isListContainer}} -{{/queryParams}} - - localVarPath = localVarPath + "?" + $.param(queryParameters); -{{#formParams}} -{{#isFile}} - reqHasFile = true; - formParams.append("{{baseName}}", {{paramName}}); -{{/isFile}} -{{^isFile}} - {{#isListContainer}} - if ({{paramName}}) { - {{#isCollectionFormatMulti}} - {{paramName}}.forEach((element: any) => { - formParams.append('{{baseName}}', element); - }); - {{/isCollectionFormatMulti}} - {{^isCollectionFormatMulti}} - formParams.append('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])); - {{/isCollectionFormatMulti}} - } - {{/isListContainer}} - {{^isListContainer}} - if ({{paramName}} !== null && {{paramName}} !== undefined) { - formParams.append('{{baseName}}', {{paramName}}); - } - {{/isListContainer}} -{{/isFile}} -{{/formParams}} -{{#headerParams}} - {{#isListContainer}} - if ({{paramName}}) { - headerParams['{{baseName}}'] = {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']); - } - {{/isListContainer}} - {{^isListContainer}} - headerParams['{{baseName}}'] = String({{paramName}}); - {{/isListContainer}} - -{{/headerParams}} - // to determine the Content-Type header - let consumes: string[] = [ - {{#consumes}} - '{{{mediaType}}}'{{#hasMore}}, {{/hasMore}} - {{/consumes}} - ]; - - // to determine the Accept header - let produces: string[] = [ - {{#produces}} - '{{{mediaType}}}'{{#hasMore}}, {{/hasMore}} - {{/produces}} - ]; - -{{#authMethods}} - // authentication ({{name}}) required -{{#isApiKey}} -{{#isKeyInHeader}} - if (this.configuration.apiKey) { - headerParams['{{keyParamName}}'] = this.configuration.apiKey; - } - -{{/isKeyInHeader}} -{{#isKeyInQuery}} - if (this.configuration.apiKey) { - queryParameters.set('{{keyParamName}}', this.configuration.apiKey); - } - -{{/isKeyInQuery}} -{{/isApiKey}} -{{#isBasic}} - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - -{{/isBasic}} -{{#isOAuth}} - // oauth required - if (this.configuration.accessToken) { - let accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headerParams['Authorization'] = 'Bearer ' + accessToken; - } - -{{/isOAuth}} -{{/authMethods}} -{{#hasFormParams}} - if (!reqHasFile) { - headerParams['Content-Type'] = 'application/x-www-form-urlencoded'; - } - -{{/hasFormParams}} - -{{#bodyParam}} - headerParams['Content-Type'] = 'application/json'; - -{{/bodyParam}} - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: '{{httpMethod}}', - headers: headerParams, - processData: false - }; - -{{#bodyParam}} - requestOptions.data = JSON.stringify({{paramName}}); -{{/bodyParam}} - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } -{{#hasFormParams}} - requestOptions.data = formParams; - if (reqHasFile) { - requestOptions.contentType = false; - } -{{/hasFormParams}} - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred(); - $.ajax(requestOptions).then( - (data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}any{{/returnType}}, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => { - if(false){} - {{#responses}} - else if (xhr.status == {{{code}}} && {{{code}}} >= 400) - { - dfd.reject(new {{dataType}}Exception(<{{dataType}}>xhr.responseJSON)) - } - - {{/responses}} - else - { - - dfd.reject(errorThrown) - } - } - ); - return dfd.promise(); - } - -{{/operation}} -} -{{/operations}} diff --git a/lib/swagger-typescript-jquery/apis.mustache b/lib/swagger-typescript-jquery/apis.mustache deleted file mode 100644 index 9d3e9234..00000000 --- a/lib/swagger-typescript-jquery/apis.mustache +++ /dev/null @@ -1,9 +0,0 @@ -{{#apiInfo}} -{{#apis}} -{{#operations}} -export * from './{{ classFilename }}'; -import { {{ classname }} } from './{{ classFilename }}'; -{{/operations}} -{{/apis}} -export const APIS = [{{#apis}}{{#operations}}{{ classname }}{{/operations}}{{^-last}}, {{/-last}}{{/apis}}]; -{{/apiInfo}} diff --git a/lib/swagger-typescript-jquery/git_push.sh.mustache b/lib/swagger-typescript-jquery/git_push.sh.mustache deleted file mode 100755 index a2d75234..00000000 --- a/lib/swagger-typescript-jquery/git_push.sh.mustache +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/lib/swagger-typescript-jquery/index.mustache b/lib/swagger-typescript-jquery/index.mustache deleted file mode 100644 index d097c728..00000000 --- a/lib/swagger-typescript-jquery/index.mustache +++ /dev/null @@ -1,4 +0,0 @@ -export * from './api/api'; -export * from './model/models'; -export * from './variables'; -export * from './configuration'; \ No newline at end of file diff --git a/lib/swagger-typescript-jquery/licenseInfo.mustache b/lib/swagger-typescript-jquery/licenseInfo.mustache deleted file mode 100644 index bbd8742e..00000000 --- a/lib/swagger-typescript-jquery/licenseInfo.mustache +++ /dev/null @@ -1,11 +0,0 @@ -/** - * {{{appName}}} - * {{{appDescription}}} - * - * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ diff --git a/lib/swagger-typescript-jquery/masterApiEntry.mustache b/lib/swagger-typescript-jquery/masterApiEntry.mustache deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/swagger-typescript-jquery/model.mustache b/lib/swagger-typescript-jquery/model.mustache deleted file mode 100644 index 39fa0472..00000000 --- a/lib/swagger-typescript-jquery/model.mustache +++ /dev/null @@ -1,13 +0,0 @@ -{{>licenseInfo}} -import * as models from './models'; -{{#models}} -{{#model}} - -{{#description}} -/** - * {{{description}}} - */ -{{/description}} -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>modelGeneric}}{{/isEnum}} -{{/model}} -{{/models}} \ No newline at end of file diff --git a/lib/swagger-typescript-jquery/modelEnum.mustache b/lib/swagger-typescript-jquery/modelEnum.mustache deleted file mode 100644 index 47886484..00000000 --- a/lib/swagger-typescript-jquery/modelEnum.mustache +++ /dev/null @@ -1,12 +0,0 @@ -{{#description}} - /** - * {{{description}}} - */ -{{/description}} -export enum {{classname}} { -{{#allowableValues}} -{{#enumVars}} - {{{name}}} = {{{value}}}{{^-last}},{{/-last}} -{{/enumVars}} -{{/allowableValues}} -} \ No newline at end of file diff --git a/lib/swagger-typescript-jquery/modelGeneric.mustache b/lib/swagger-typescript-jquery/modelGeneric.mustache deleted file mode 100644 index 201f2484..00000000 --- a/lib/swagger-typescript-jquery/modelGeneric.mustache +++ /dev/null @@ -1,45 +0,0 @@ -export interface {{classname}} {{#parent}}extends models.{{{parent}}} {{/parent}}{ -{{#additionalPropertiesType}} - [key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}}; - -{{/additionalPropertiesType}} -{{#vars}} - {{#description}} - /** - * {{{description}}} - */ - {{/description}} - {{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}; - -{{/vars}} -} -export class {{classname}}Exception implements Error{ - - constructor(obj:{{classname}}, message?:string){ - {{#vars}} - this.item = obj; - {{/vars}} - - } - - message: string; - stack: string; - name: string; - - item: {{classname}}; -} - -{{#hasEnums}} -export namespace {{classname}} { -{{#vars}} - {{#isEnum}} - export enum {{enumName}} { - {{#allowableValues}} - {{#enumVars}} - {{{name}}} = {{{value}}}{{^-last}},{{/-last}} - {{/enumVars}} - {{/allowableValues}} - } - {{/isEnum}} -{{/vars}} -}{{/hasEnums}} \ No newline at end of file diff --git a/lib/swagger-typescript-jquery/models.mustache b/lib/swagger-typescript-jquery/models.mustache deleted file mode 100644 index c6e732bf..00000000 --- a/lib/swagger-typescript-jquery/models.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{#models}} -{{#model}} -export * from './{{{ classname }}}'; -{{/model}} -{{/models}} \ No newline at end of file diff --git a/lib/swagger-typescript-jquery/package.mustache b/lib/swagger-typescript-jquery/package.mustache deleted file mode 100644 index 753b37fb..00000000 --- a/lib/swagger-typescript-jquery/package.mustache +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "{{npmName}}", - "version": "{{npmVersion}}", - "description": "JQuery client for {{npmName}}", - "main": "api.js", - "scripts": { - "build": "tsc" - }, - "author": "Swagger Codegen Contributors", - "license": "MIT", - "dependencies": { - "bluebird": "^3.3.5", - "request": "^2.72.0", - "jquery": "^3.1.1" - }, - "devDependencies": { - "typescript": "2.2.2", - "typings": "^1.3.0" - }{{#npmRepository}}, - "publishConfig":{ - "registry":"{{npmRepository}}" - }{{/npmRepository}} -} diff --git a/lib/swagger-typescript-jquery/tsconfig.mustache b/lib/swagger-typescript-jquery/tsconfig.mustache deleted file mode 100644 index c5228429..00000000 --- a/lib/swagger-typescript-jquery/tsconfig.mustache +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "noImplicitAny": false, - "suppressImplicitAnyIndexErrors": true, - "target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", - "moduleResolution": "node", - "removeComments": true, - "sourceMap": true, - "noLib": false, - "declaration": true - }, - "files": [ - "index.ts", - "typings/index.d.ts" - ] -} - diff --git a/lib/swagger-typescript-jquery/typings.mustache b/lib/swagger-typescript-jquery/typings.mustache deleted file mode 100644 index 306cf301..00000000 --- a/lib/swagger-typescript-jquery/typings.mustache +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ambientDependencies": { - "bluebird": "registry:dt/bluebird#2.0.0+20160319051630", - "core-js": "registry:dt/core-js#0.0.0+20160317120654", - "node": "registry:dt/node#4.0.0+20160423143914" - }, - "globalDependencies": { - "jquery": "registry:dt/jquery#1.10.0+20170310222111" - } -} \ No newline at end of file diff --git a/lib/swagger-typescript-jquery/variables.mustache b/lib/swagger-typescript-jquery/variables.mustache deleted file mode 100644 index 505ce935..00000000 --- a/lib/swagger-typescript-jquery/variables.mustache +++ /dev/null @@ -1,7 +0,0 @@ - -export const COLLECTION_FORMATS = { - 'csv': ',', - 'tsv': ' ', - 'ssv': ' ', - 'pipes': '|' -} \ No newline at end of file diff --git a/lib/tasks/settings.rake b/lib/tasks/settings.rake index 3a344add..15391d26 100644 --- a/lib/tasks/settings.rake +++ b/lib/tasks/settings.rake @@ -12,25 +12,4 @@ namespace :settings do require 'pp' pp Settings.to_hash end - - task generate_json: :environment do - cdn_url = URI(Settings.cdn.url) - cdn_url = cdn_url.to_s - if Settings.button_config&.url - cdn_url = URI(Settings.button_config.url).to_s - end - c = { button: { url: cdn_url, css: "#{cdn_url}/css/donate-button.v2.css" } } - open(File.expand_path('config/settings.json', Rails.root), 'w') do |f| - f.write(c.to_json) - end - end - - task combine_translations: 'i18n:js:export' do - js_root = File.expand_path('public/javascripts', Rails.root) - # i18n = File.read(File.join(js_root, 'i18n.js')) - translations = File.read(File.join(js_root, 'translations.js')) - open(File.join(js_root, '_final.js'), 'w') do |f| - f.write("const I18n = require('i18n-js');\n" + translations + "\n window.I18n = I18n") - end - end end diff --git a/package.json b/package.json index 9c45f737..56682efe 100644 --- a/package.json +++ b/package.json @@ -6,17 +6,10 @@ "url": "https://github.com/houdiniproject/houdini" }, "scripts": { - "watch": "export HOUDINI_WATCH=1; script/build.sh", - "build": "script/build.sh", "build-all": "yarn ci && script/compile-assets.sh && yarn build", "ci-build-all": "script/compile-assets.sh && yarn build", "test": "rake -v spec && yarn build && yarn jest", - "export-button-config": "bundle exec rake settings:generate_json", - "generate-openapi": "rake oapi:gen", - "get-codegen-cli": "script/download_codegen_cli.sh", - "generate-api-js": "rm -rf javascripts/api && yarn get-codegen-cli && yarn generate-openapi && java -jar .bin/swagger-codegen-cli.jar generate -l 'typescript-jquery' -i tmp/openapi.json -o javascripts/api --config 'swagger.json' -t lib/swagger-typescript-jquery", - "jest": "jest", - "webpack": "webpack" + "jest": "jest" }, "devDependencies": { "@babel/preset-env": "^7.7.1", diff --git a/script/build.sh b/script/build.sh deleted file mode 100755 index d561dad4..00000000 --- a/script/build.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - - -( -echo $HOUDINI_WATCH -set -e -set -o pipefail -export DATABASE_URL=${BUILD_DATABASE_URL:-postgres://admin:password@db/commitchange_development} -echo $DATABASE_URL - yarn export-i18n && yarn generate-api-js - -if [ -n "$HOUDINI_WATCH" ]; -then - echo "we're gonna watch!!!" - bin/webpack --watch -else - echo "we're gonna build!!!" - NODE_ENV=production yarn webpack -p -fi -) \ No newline at end of file diff --git a/script/build/debian/java.sh b/script/build/debian/java.sh deleted file mode 100755 index 983907ce..00000000 --- a/script/build/debian/java.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -e - -apt-get -yy install default-jre \ No newline at end of file diff --git a/script/download_codegen_cli.sh b/script/download_codegen_cli.sh deleted file mode 100755 index 22c41648..00000000 --- a/script/download_codegen_cli.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -if [ ! -e .bin/swagger-codegen-cli.jar ] -then - curl -L https://repo1.maven.org/content/repositories/releases/io/swagger/swagger-codegen-cli/2.3.1/swagger-codegen-cli-2.3.1.jar -o .bin/swagger-codegen-cli.jar --create-dirs -fi diff --git a/swagger.json b/swagger.json deleted file mode 100644 index 4282e7ef..00000000 --- a/swagger.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "modelPropertyNaming": "original" -} \ No newline at end of file