@aws-amplify/amplify-util-uibuilder 1.4.1-beta.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -1
- package/lib/clients/amplify-studio-client.d.ts +17 -0
- package/lib/clients/amplify-studio-client.d.ts.map +1 -0
- package/lib/clients/amplify-studio-client.js +145 -0
- package/lib/clients/amplify-studio-client.js.map +1 -0
- package/lib/clients/index.d.ts +2 -0
- package/lib/clients/index.d.ts.map +1 -0
- package/lib/clients/index.js +9 -0
- package/lib/clients/index.js.map +1 -0
- package/lib/commands/cloneComponentsFromEnv.d.ts +1 -1
- package/lib/commands/cloneComponentsFromEnv.d.ts.map +1 -1
- package/lib/commands/cloneComponentsFromEnv.js +15 -31
- package/lib/commands/cloneComponentsFromEnv.js.map +1 -1
- package/lib/commands/generateComponents.d.ts.map +1 -1
- package/lib/commands/generateComponents.js +14 -12
- package/lib/commands/generateComponents.js.map +1 -1
- package/lib/commands/utils/{createUiBuilderComponent.d.ts → codegenResources.d.ts} +5 -3
- package/lib/commands/utils/codegenResources.d.ts.map +1 -0
- package/lib/commands/utils/{createUiBuilderComponent.js → codegenResources.js} +26 -4
- package/lib/commands/utils/codegenResources.js.map +1 -0
- package/lib/commands/utils/environmentHelpers.d.ts +5 -0
- package/lib/commands/utils/environmentHelpers.d.ts.map +1 -0
- package/lib/commands/utils/environmentHelpers.js +25 -0
- package/lib/commands/utils/environmentHelpers.js.map +1 -0
- package/lib/commands/utils/index.d.ts +8 -0
- package/lib/commands/utils/index.d.ts.map +1 -0
- package/lib/commands/utils/index.js +20 -0
- package/lib/commands/utils/index.js.map +1 -0
- package/lib/commands/utils/syncAmplifyUiBuilderComponents.d.ts +9 -18
- package/lib/commands/utils/syncAmplifyUiBuilderComponents.d.ts.map +1 -1
- package/lib/commands/utils/syncAmplifyUiBuilderComponents.js +8 -80
- package/lib/commands/utils/syncAmplifyUiBuilderComponents.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/package.json +15 -8
- package/src/__tests__/cloneComponentsFromEnv.test.ts +33 -26
- package/src/__tests__/createUiBuilderComponent.test.ts +14 -13
- package/src/__tests__/generateComponents.test.ts +40 -30
- package/src/__tests__/getAmplifyDataSchema.test.ts +102 -0
- package/src/__tests__/syncAmplifyUiComponents.test.ts +55 -33
- package/src/clients/amplify-studio-client.ts +161 -0
- package/src/clients/index.ts +1 -0
- package/src/commands/cloneComponentsFromEnv.ts +26 -29
- package/src/commands/generateComponents.ts +19 -12
- package/src/commands/utils/{createUiBuilderComponent.ts → codegenResources.ts} +39 -11
- package/src/commands/utils/environmentHelpers.ts +32 -0
- package/src/commands/utils/index.ts +7 -0
- package/src/commands/utils/syncAmplifyUiBuilderComponents.ts +38 -81
- package/src/index.ts +15 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/commands/utils/amplifyUiBuilderService.d.ts +0 -5
- package/lib/commands/utils/amplifyUiBuilderService.d.ts.map +0 -1
- package/lib/commands/utils/amplifyUiBuilderService.js +0 -20
- package/lib/commands/utils/amplifyUiBuilderService.js.map +0 -1
- package/lib/commands/utils/createUiBuilderComponent.d.ts.map +0 -1
- package/lib/commands/utils/createUiBuilderComponent.js.map +0 -1
- package/src/commands/utils/amplifyUiBuilderService.ts +0 -22
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AmplifyUIBuilder } from 'aws-sdk';
|
|
2
|
-
import { $TSContext } from 'amplify-cli-core';
|
|
3
|
-
export { Component, Theme } from 'aws-sdk/clients/amplifyuibuilder';
|
|
4
|
-
export declare const getAmplifyUIBuilderService: (context: $TSContext, environmentName: string, appId: string) => Promise<AmplifyUIBuilder>;
|
|
5
|
-
//# sourceMappingURL=amplifyUiBuilderService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"amplifyUiBuilderService.d.ts","sourceRoot":"","sources":["../../../src/commands/utils/amplifyUiBuilderService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAU,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEpE,eAAO,MAAM,0BAA0B,YAAmB,UAAU,mBAAmB,MAAM,SAAS,MAAM,KAAG,QAAQ,gBAAgB,CAgBtI,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAmplifyUIBuilderService = void 0;
|
|
4
|
-
const aws_sdk_1 = require("aws-sdk");
|
|
5
|
-
const getAmplifyUIBuilderService = async (context, environmentName, appId) => {
|
|
6
|
-
const awsConfigInfo = (await context.amplify.invokePluginMethod(context, 'awscloudformation', undefined, 'loadConfigurationForEnv', [
|
|
7
|
-
context,
|
|
8
|
-
environmentName,
|
|
9
|
-
appId,
|
|
10
|
-
]));
|
|
11
|
-
if (process.env.UI_BUILDER_ENDPOINT) {
|
|
12
|
-
awsConfigInfo.endpoint = process.env.UI_BUILDER_ENDPOINT;
|
|
13
|
-
}
|
|
14
|
-
if (process.env.UI_BUILDER_REGION) {
|
|
15
|
-
awsConfigInfo.region = process.env.UI_BUILDER_REGION;
|
|
16
|
-
}
|
|
17
|
-
return new aws_sdk_1.AmplifyUIBuilder(awsConfigInfo);
|
|
18
|
-
};
|
|
19
|
-
exports.getAmplifyUIBuilderService = getAmplifyUIBuilderService;
|
|
20
|
-
//# sourceMappingURL=amplifyUiBuilderService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"amplifyUiBuilderService.js","sourceRoot":"","sources":["../../../src/commands/utils/amplifyUiBuilderService.ts"],"names":[],"mappings":";;;AAAA,qCAA2C;AAKpC,MAAM,0BAA0B,GAAG,KAAK,EAAE,OAAmB,EAAE,eAAuB,EAAE,KAAa,EAA6B,EAAE;IACzI,MAAM,aAAa,GAAG,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,yBAAyB,EAAE;QAClI,OAAO;QACP,eAAe;QACf,KAAK;KACN,CAAC,CAAW,CAAC;IAEd,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE;QACnC,aAAa,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;KAC1D;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;QACjC,aAAa,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;KACtD;IAED,OAAO,IAAI,0BAAgB,CAAC,aAAa,CAAC,CAAC;AAC7C,CAAC,CAAC;AAhBW,QAAA,0BAA0B,8BAgBrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createUiBuilderComponent.d.ts","sourceRoot":"","sources":["../../../src/commands/utils/createUiBuilderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,WAAW,EAIX,2BAA2B,EAC5B,MAAM,yBAAyB,CAAC;AAWjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAa9C,eAAO,MAAM,wBAAwB,YAAa,UAAU,UAAU,eAAe,KAAG,eAmBvF,CAAC;AAKF,eAAO,MAAM,oBAAoB,YAAa,UAAU,UAAU,WAAW,KAAG,WA0B/E,CAAC;AAKF,eAAO,MAAM,iCAAiC,YAAa,UAAU,WAAW,eAAe,EAAE,KAAG,2BAwBnG,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createUiBuilderComponent.js","sourceRoot":"","sources":["../../../src/commands/utils/createUiBuilderComponent.ts"],"names":[],"mappings":";;;AAAA,wDAQiC;AACjC,oEAOuC;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,yBAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,yBAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACpD,yBAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,CAAC;KACT;AACH,CAAC,CAAC;AA1BW,QAAA,oBAAoB,wBA0B/B;AAKK,MAAM,iCAAiC,GAAG,CAAC,OAAmB,EAAE,OAA0B,EAA+B,EAAE;IAChI,MAAM,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;IACpE,MAAM,eAAe,GAAG,IAAI,0CAA6B,CACvD,CAAC,SAA4B,EAAE,EAAE,CAAC,IAAI,mDAAgC,CAAC,SAAS,EAAE,MAAM,CAKrF,CACJ,CAAC;IAEF,MAAM,aAAa,GAAG,uBAAuB,CAAC;IAE9C,MAAM,eAAe,GAAG,IAAI,0CAA6B,CAAC,eAAe,EAAE;QACzE,aAAa;KACd,CAAC,CAAC;IAEH,IAAI;QACF,OAAO,eAAe,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;KACxD;IAAC,OAAO,CAAC,EAAE;QACV,yBAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,yBAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACzD,MAAM,CAAC,CAAC;KACT;AACH,CAAC,CAAC;AAxBW,QAAA,iCAAiC,qCAwB5C"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AmplifyUIBuilder } from 'aws-sdk';
|
|
2
|
-
import { $TSContext, $TSAny } from 'amplify-cli-core';
|
|
3
|
-
|
|
4
|
-
export { Component, Theme } from 'aws-sdk/clients/amplifyuibuilder';
|
|
5
|
-
|
|
6
|
-
export const getAmplifyUIBuilderService = async (context: $TSContext, environmentName: string, appId: string): Promise<AmplifyUIBuilder> => {
|
|
7
|
-
const awsConfigInfo = (await context.amplify.invokePluginMethod(context, 'awscloudformation', undefined, 'loadConfigurationForEnv', [
|
|
8
|
-
context,
|
|
9
|
-
environmentName,
|
|
10
|
-
appId,
|
|
11
|
-
])) as $TSAny;
|
|
12
|
-
|
|
13
|
-
if (process.env.UI_BUILDER_ENDPOINT) {
|
|
14
|
-
awsConfigInfo.endpoint = process.env.UI_BUILDER_ENDPOINT;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (process.env.UI_BUILDER_REGION) {
|
|
18
|
-
awsConfigInfo.region = process.env.UI_BUILDER_REGION;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return new AmplifyUIBuilder(awsConfigInfo);
|
|
22
|
-
};
|