@aws-amplify/amplify-util-uibuilder 1.5.0 → 1.6.0-beta.0
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 +43 -0
- package/amplify-plugin.json +10 -3
- package/lib/clients/amplify-studio-client.d.ts +13 -2
- package/lib/clients/amplify-studio-client.d.ts.map +1 -1
- package/lib/clients/amplify-studio-client.js +85 -17
- package/lib/clients/amplify-studio-client.js.map +1 -1
- package/lib/commands/generateComponents.d.ts.map +1 -1
- package/lib/commands/generateComponents.js +33 -15
- package/lib/commands/generateComponents.js.map +1 -1
- package/lib/commands/help.d.ts +1 -1
- package/lib/commands/help.d.ts.map +1 -1
- package/lib/commands/help.js +2 -2
- package/lib/commands/help.js.map +1 -1
- package/lib/commands/utils/codegenResources.d.ts +14 -3
- package/lib/commands/utils/codegenResources.d.ts.map +1 -1
- package/lib/commands/utils/codegenResources.js +72 -5
- package/lib/commands/utils/codegenResources.js.map +1 -1
- package/lib/commands/utils/featureFlags.d.ts +2 -0
- package/lib/commands/utils/featureFlags.d.ts.map +1 -0
- package/lib/commands/utils/featureFlags.js +35 -0
- package/lib/commands/utils/featureFlags.js.map +1 -0
- package/lib/commands/utils/getUiBuilderComponentsPath.d.ts.map +1 -1
- package/lib/commands/utils/getUiBuilderComponentsPath.js.map +1 -1
- package/lib/commands/utils/shouldRenderComponents.d.ts +1 -1
- package/lib/commands/utils/shouldRenderComponents.d.ts.map +1 -1
- package/lib/commands/utils/shouldRenderComponents.js +14 -8
- package/lib/commands/utils/shouldRenderComponents.js.map +1 -1
- package/lib/commands/utils/syncAmplifyUiBuilderComponents.d.ts +12 -20
- package/lib/commands/utils/syncAmplifyUiBuilderComponents.d.ts.map +1 -1
- package/lib/commands/utils/syncAmplifyUiBuilderComponents.js +51 -3
- package/lib/commands/utils/syncAmplifyUiBuilderComponents.js.map +1 -1
- package/lib/commands/version.d.ts +1 -1
- package/lib/commands/version.d.ts.map +1 -1
- package/lib/commands/version.js +2 -2
- package/lib/commands/version.js.map +1 -1
- package/lib/event-handlers/handle-PostEnvAdd.d.ts +1 -1
- package/lib/event-handlers/handle-PostEnvAdd.d.ts.map +1 -1
- package/lib/event-handlers/handle-PostEnvAdd.js +4 -6
- package/lib/event-handlers/handle-PostEnvAdd.js.map +1 -1
- package/lib/event-handlers/handle-PostPull.d.ts +1 -1
- package/lib/event-handlers/handle-PostPull.d.ts.map +1 -1
- package/lib/event-handlers/handle-PostPull.js +4 -3
- package/lib/event-handlers/handle-PostPull.js.map +1 -1
- package/lib/event-handlers/handle-PostPush.d.ts +3 -0
- package/lib/event-handlers/handle-PostPush.d.ts.map +1 -0
- package/lib/event-handlers/handle-PostPush.js +15 -0
- package/lib/event-handlers/handle-PostPush.js.map +1 -0
- package/package.json +8 -7
- package/src/__tests__/cloneComponentsFromEnv.test.ts +17 -6
- package/src/__tests__/createUiBuilderComponent.test.ts +26 -3
- package/src/__tests__/generateComponents.test.ts +44 -15
- package/src/__tests__/getAmplifyDataSchema.test.ts +51 -19
- package/src/__tests__/shouldRenderComponents.test.ts +51 -4
- package/src/__tests__/syncAmplifyUiComponents.test.ts +126 -8
- package/src/__tests__/utils.ts +70 -0
- package/src/clients/amplify-studio-client.ts +157 -69
- package/src/commands/generateComponents.ts +43 -16
- package/src/commands/help.ts +5 -2
- package/src/commands/utils/codegenResources.ts +115 -6
- package/src/commands/utils/featureFlags.ts +62 -0
- package/src/commands/utils/getUiBuilderComponentsPath.ts +7 -2
- package/src/commands/utils/shouldRenderComponents.ts +20 -8
- package/src/commands/utils/syncAmplifyUiBuilderComponents.ts +96 -29
- package/src/commands/version.ts +5 -2
- package/src/event-handlers/handle-PostEnvAdd.ts +8 -6
- package/src/event-handlers/handle-PostPull.ts +7 -3
- package/src/event-handlers/handle-PostPush.ts +15 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/src/__tests__/handleEvents.test.ts +0 -21
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { run as runPostEnvAdd } from '../event-handlers/handle-PostEnvAdd';
|
|
2
|
-
import { run as runPostPull } from '../event-handlers/handle-PostPull';
|
|
3
|
-
|
|
4
|
-
describe('can handle events', () => {
|
|
5
|
-
let context: any;
|
|
6
|
-
beforeEach(() => {
|
|
7
|
-
context = {
|
|
8
|
-
amplify: {
|
|
9
|
-
invokePluginMethod: jest.fn(),
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
});
|
|
13
|
-
it('handles postEnvAdd', async () => {
|
|
14
|
-
await runPostEnvAdd(context);
|
|
15
|
-
expect(context.amplify.invokePluginMethod).toBeCalledTimes(1);
|
|
16
|
-
});
|
|
17
|
-
it('handles postPull', async () => {
|
|
18
|
-
await runPostPull(context);
|
|
19
|
-
expect(context.amplify.invokePluginMethod).toBeCalledTimes(1);
|
|
20
|
-
});
|
|
21
|
-
});
|