@nlabs/lex 1.49.4 → 1.50.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.
Files changed (55) hide show
  1. package/.swcrc +35 -0
  2. package/README.md +43 -59
  3. package/__mocks__/chalk.js +19 -17
  4. package/config.json +32 -8
  5. package/examples/lex.config.js +110 -10
  6. package/index.cjs +1 -5
  7. package/lex.config.js +34 -7
  8. package/lib/Button.stories.js +99 -0
  9. package/lib/LexConfig.d.ts +60 -22
  10. package/lib/LexConfig.js +285 -244
  11. package/lib/commands/ai/ai.js +287 -288
  12. package/lib/commands/ai/index.js +8 -7
  13. package/lib/commands/build/build.d.ts +2 -2
  14. package/lib/commands/build/build.js +349 -458
  15. package/lib/commands/clean/clean.js +45 -33
  16. package/lib/commands/compile/compile.js +214 -227
  17. package/lib/commands/config/config.js +46 -42
  18. package/lib/commands/copy/copy.js +36 -35
  19. package/lib/commands/create/create.js +200 -121
  20. package/lib/commands/dev/dev.d.ts +2 -0
  21. package/lib/commands/dev/dev.js +259 -263
  22. package/lib/commands/init/init.js +108 -88
  23. package/lib/commands/link/link.js +18 -14
  24. package/lib/commands/lint/lint.js +735 -742
  25. package/lib/commands/migrate/migrate.js +49 -36
  26. package/lib/commands/publish/publish.js +116 -96
  27. package/lib/commands/serverless/serverless.js +611 -585
  28. package/lib/commands/storybook/storybook.js +242 -238
  29. package/lib/commands/test/test.d.ts +1 -1
  30. package/lib/commands/test/test.js +382 -394
  31. package/lib/commands/update/update.js +141 -120
  32. package/lib/commands/upgrade/upgrade.js +51 -44
  33. package/lib/commands/versions/versions.d.ts +1 -1
  34. package/lib/commands/versions/versions.js +36 -38
  35. package/lib/create/changelog.js +136 -125
  36. package/lib/index.js +40 -38
  37. package/lib/lex.js +95 -68
  38. package/lib/storybook/index.js +6 -1
  39. package/lib/test-react/index.js +7 -84
  40. package/lib/types.d.ts +1 -1
  41. package/lib/types.js +7 -1
  42. package/lib/utils/aiService.js +240 -227
  43. package/lib/utils/app.js +274 -273
  44. package/lib/utils/deepMerge.js +37 -23
  45. package/lib/utils/file.js +218 -215
  46. package/lib/utils/log.js +29 -27
  47. package/lib/utils/reactShim.js +7 -85
  48. package/lib/utils/translations.js +91 -65
  49. package/package.json +63 -64
  50. package/templates/typescript/DataLayer.js.txt +218 -0
  51. package/templates/typescript/DataLayer.test.js.txt +268 -0
  52. package/templates/typescript/DataLayer.test.ts.txt +269 -0
  53. package/templates/typescript/DataLayer.ts.txt +227 -0
  54. package/webpack.config.js +53 -26
  55. package/lib/commands/lint/autofix.d.ts +0 -2
@@ -1,7 +1,8 @@
1
- import ai from "./ai.js";
2
- var ai_default = ai;
3
- export {
4
- ai,
5
- ai_default as default
6
- };
7
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vc3JjL2NvbW1hbmRzL2FpL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxOC1QcmVzZW50LCBOaXRyb2dlbiBMYWJzLCBJbmMuXG4gKiBDb3B5cmlnaHRzIGxpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgTGljZW5zZS4gU2VlIHRoZSBhY2NvbXBhbnlpbmcgTElDRU5TRSBmaWxlIGZvciB0ZXJtcy5cbiAqL1xuaW1wb3J0IGFpLCB7dHlwZSBBSU9wdGlvbnN9IGZyb20gJy4vYWkuanMnO1xuXG5leHBvcnQge2FpfTtcbmV4cG9ydCB0eXBlIHtBSU9wdGlvbnN9O1xuZXhwb3J0IGRlZmF1bHQgYWk7Il0sCiAgIm1hcHBpbmdzIjogIkFBSUEsT0FBTyxRQUEwQjtBQUlqQyxJQUFPLGFBQVE7IiwKICAibmFtZXMiOiBbXQp9Cg==
1
+ /**
2
+ * Copyright (c) 2018-Present, Nitrogen Labs, Inc.
3
+ * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
+ */ import ai from './ai.js';
5
+ export { ai };
6
+ export default ai;
7
+
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21tYW5kcy9haS9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxOC1QcmVzZW50LCBOaXRyb2dlbiBMYWJzLCBJbmMuXG4gKiBDb3B5cmlnaHRzIGxpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgTGljZW5zZS4gU2VlIHRoZSBhY2NvbXBhbnlpbmcgTElDRU5TRSBmaWxlIGZvciB0ZXJtcy5cbiAqL1xuaW1wb3J0IGFpLCB7dHlwZSBBSU9wdGlvbnN9IGZyb20gJy4vYWkuanMnO1xuXG5leHBvcnQge2FpfTtcbmV4cG9ydCB0eXBlIHtBSU9wdGlvbnN9O1xuZXhwb3J0IGRlZmF1bHQgYWk7Il0sIm5hbWVzIjpbImFpIl0sIm1hcHBpbmdzIjoiQUFBQTs7O0NBR0MsR0FDRCxPQUFPQSxRQUEwQixVQUFVO0FBRTNDLFNBQVFBLEVBQUUsR0FBRTtBQUVaLGVBQWVBLEdBQUcifQ==
@@ -1,7 +1,7 @@
1
1
  export interface BuildOptions {
2
2
  readonly assist?: boolean;
3
3
  readonly analyze?: boolean;
4
- readonly bundler?: 'webpack' | 'esbuild';
4
+ readonly bundler?: 'webpack' | 'swc';
5
5
  readonly cliName?: string;
6
6
  readonly entry?: string;
7
7
  readonly format?: string;
@@ -15,7 +15,7 @@ export interface BuildOptions {
15
15
  readonly watch?: boolean;
16
16
  }
17
17
  export type BuildCallback = (status: number) => void;
18
- export declare const buildWithEsBuild: (spinner: any, commandOptions: BuildOptions, callback: BuildCallback) => Promise<1 | 0>;
18
+ export declare const buildWithSWC: (spinner: any, commandOptions: BuildOptions, callback: BuildCallback) => Promise<1 | 0>;
19
19
  export declare const buildWithWebpack: (spinner: any, cmd: any, callback: any) => Promise<1 | 0>;
20
20
  export declare const build: (cmd: BuildOptions, callback?: BuildCallback) => Promise<number>;
21
21
  export default build;