@orizm/cli 1.0.3 → 1.1.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.
Files changed (73) hide show
  1. package/dist/cli.cjs +1726 -0
  2. package/dist/cli.d.ts +2 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +309 -73
  5. package/dist/cms/generate/command.d.ts +3 -0
  6. package/dist/cms/generate/command.d.ts.map +1 -0
  7. package/dist/cms/generate/generator.d.ts +8 -0
  8. package/dist/cms/generate/generator.d.ts.map +1 -0
  9. package/dist/cms/pull/action.d.ts +5 -0
  10. package/dist/cms/pull/action.d.ts.map +1 -0
  11. package/dist/cms/pull/command.d.ts +3 -0
  12. package/dist/cms/pull/command.d.ts.map +1 -0
  13. package/dist/config/functions.d.ts +38 -0
  14. package/dist/config/functions.d.ts.map +1 -0
  15. package/dist/config/functions.test.d.ts +2 -0
  16. package/dist/config/functions.test.d.ts.map +1 -0
  17. package/dist/config/generate-erd/command.d.ts +3 -0
  18. package/dist/config/generate-erd/command.d.ts.map +1 -0
  19. package/dist/config/generate-erd/convert-to-input.d.ts +23 -0
  20. package/dist/config/generate-erd/convert-to-input.d.ts.map +1 -0
  21. package/dist/config/generate-erd/convert-to-input.test.d.ts +2 -0
  22. package/dist/config/generate-erd/convert-to-input.test.d.ts.map +1 -0
  23. package/dist/config/generate-erd/generate.d.ts +3 -0
  24. package/dist/config/generate-erd/generate.d.ts.map +1 -0
  25. package/dist/config/index.cjs +107 -0
  26. package/dist/config/index.d.ts +2 -0
  27. package/dist/config/index.d.ts.map +1 -0
  28. package/dist/config/index.js +80 -0
  29. package/dist/config/validate/command.d.ts +3 -0
  30. package/dist/config/validate/command.d.ts.map +1 -0
  31. package/dist/config/validate/watcher.d.ts +2 -0
  32. package/dist/config/validate/watcher.d.ts.map +1 -0
  33. package/dist/consumer/generate/action.d.ts +2 -0
  34. package/dist/consumer/generate/action.d.ts.map +1 -0
  35. package/dist/consumer/generate/command.d.ts +3 -0
  36. package/dist/consumer/generate/command.d.ts.map +1 -0
  37. package/dist/consumer/pull/action.d.ts +5 -0
  38. package/dist/consumer/pull/action.d.ts.map +1 -0
  39. package/dist/consumer/pull/command.d.ts +3 -0
  40. package/dist/consumer/pull/command.d.ts.map +1 -0
  41. package/dist/consumer/pull/generate.d.ts +7 -0
  42. package/dist/consumer/pull/generate.d.ts.map +1 -0
  43. package/dist/lib/cli-cursor.d.ts +3 -0
  44. package/dist/lib/cli-cursor.d.ts.map +1 -0
  45. package/dist/lib/cli-input.d.ts +2 -0
  46. package/dist/lib/cli-input.d.ts.map +1 -0
  47. package/dist/lib/cli-spinner.d.ts +13 -0
  48. package/dist/lib/cli-spinner.d.ts.map +1 -0
  49. package/dist/lib/cli-symbol.d.ts +3 -0
  50. package/dist/lib/cli-symbol.d.ts.map +1 -0
  51. package/dist/lib/cli-table.d.ts +16 -0
  52. package/dist/lib/cli-table.d.ts.map +1 -0
  53. package/dist/lib/developer-api.d.ts +7 -0
  54. package/dist/lib/developer-api.d.ts.map +1 -0
  55. package/dist/lib/display-change-events.d.ts +5 -0
  56. package/dist/lib/display-change-events.d.ts.map +1 -0
  57. package/dist/lib/display-valibot-error.d.ts +6 -0
  58. package/dist/lib/display-valibot-error.d.ts.map +1 -0
  59. package/dist/lib/display-valibot-error.test.d.ts +2 -0
  60. package/dist/lib/display-valibot-error.test.d.ts.map +1 -0
  61. package/dist/lib/fetch-current-definition.d.ts +7 -0
  62. package/dist/lib/fetch-current-definition.d.ts.map +1 -0
  63. package/dist/lib/handle-error.d.ts +2 -0
  64. package/dist/lib/handle-error.d.ts.map +1 -0
  65. package/dist/lib/load-config.d.ts +3 -0
  66. package/dist/lib/load-config.d.ts.map +1 -0
  67. package/dist/lib/load-env.d.ts +10 -0
  68. package/dist/lib/load-env.d.ts.map +1 -0
  69. package/dist/push/command.d.ts +3 -0
  70. package/dist/push/command.d.ts.map +1 -0
  71. package/dist/types.d.ts +22 -0
  72. package/dist/types.d.ts.map +1 -0
  73. package/package.json +19 -5
@@ -0,0 +1,23 @@
1
+ import { ServerOrizmConfig } from "../../types";
2
+ export type TemplateInput = {
3
+ tables: TableInput[];
4
+ relations: RelationInput[];
5
+ };
6
+ type TableInput = {
7
+ name: string;
8
+ columns: ColumnInput[];
9
+ };
10
+ type ColumnInput = {
11
+ name: string;
12
+ type: string;
13
+ isForeignKey: boolean;
14
+ };
15
+ type RelationInput = {
16
+ from: string;
17
+ to: string;
18
+ type: string;
19
+ comment: string;
20
+ };
21
+ export declare function convertToInput(config: ServerOrizmConfig): TemplateInput;
22
+ export {};
23
+ //# sourceMappingURL=convert-to-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-to-input.d.ts","sourceRoot":"","sources":["../../../src/config/generate-erd/convert-to-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,SAAS,EAAE,aAAa,EAAE,CAAC;CAC5B,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB,GAAG,aAAa,CAuFvE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=convert-to-input.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-to-input.test.d.ts","sourceRoot":"","sources":["../../../src/config/generate-erd/convert-to-input.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { TemplateInput } from "./convert-to-input.js";
2
+ export declare function generate(input: TemplateInput): string;
3
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/config/generate-erd/generate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAGrD"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/config/index.ts
21
+ var config_exports = {};
22
+ __export(config_exports, {
23
+ defineConfig: () => defineConfig
24
+ });
25
+ module.exports = __toCommonJS(config_exports);
26
+
27
+ // src/config/functions.ts
28
+ function defineConfig(config) {
29
+ const {
30
+ tables = {},
31
+ tableModules = {},
32
+ buckets = {},
33
+ authorities = []
34
+ } = config;
35
+ return {
36
+ tables: Object.entries(tables).map(
37
+ ([tableName, tableInput]) => table(tableName, tableInput)
38
+ ),
39
+ tableModules: Object.entries(tableModules).map(
40
+ ([moduleName, moduleInput]) => module2(moduleName, moduleInput)
41
+ ),
42
+ buckets: Object.entries(buckets).map(
43
+ ([bucketName, bucketInput]) => bucket(bucketName, bucketInput)
44
+ ),
45
+ authorities
46
+ };
47
+ }
48
+ function table(name, input) {
49
+ const { columns, indexes, formOptions, ...rest } = input;
50
+ const definition = {
51
+ ...rest,
52
+ name,
53
+ columns: Object.entries(columns).map(
54
+ ([columnName, columnInput]) => column(columnName, columnInput)
55
+ )
56
+ };
57
+ if (indexes) {
58
+ definition.indexes = indexes.map((index) => ({
59
+ ...index,
60
+ columns: index.columns.map((columnName) => columnName)
61
+ }));
62
+ }
63
+ if (formOptions) {
64
+ definition.formOptions = {
65
+ submissionColumns: Object.entries(formOptions.submissionColumns).map(
66
+ ([columnName, columnInput]) => column(columnName, columnInput)
67
+ )
68
+ };
69
+ }
70
+ return definition;
71
+ }
72
+ function module2(name, input) {
73
+ return {
74
+ ...input,
75
+ name,
76
+ columns: Object.entries(input.columns).map(
77
+ ([columnName, columnInput]) => column(columnName, columnInput)
78
+ )
79
+ };
80
+ }
81
+ function column(name, input) {
82
+ if (isStringColumn(input)) {
83
+ const { pattern, ...rest } = input;
84
+ const definition = { ...rest, name };
85
+ if (pattern) {
86
+ definition.pattern = pattern instanceof RegExp ? pattern.source : pattern;
87
+ }
88
+ return definition;
89
+ }
90
+ return {
91
+ ...input,
92
+ name
93
+ };
94
+ }
95
+ function isStringColumn(column2) {
96
+ return column2.type === "string";
97
+ }
98
+ function bucket(name, input) {
99
+ return {
100
+ ...input,
101
+ name
102
+ };
103
+ }
104
+ // Annotate the CommonJS export names for ESM import in node:
105
+ 0 && (module.exports = {
106
+ defineConfig
107
+ });
@@ -0,0 +1,2 @@
1
+ export * from "./functions.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,80 @@
1
+ // src/config/functions.ts
2
+ function defineConfig(config) {
3
+ const {
4
+ tables = {},
5
+ tableModules = {},
6
+ buckets = {},
7
+ authorities = []
8
+ } = config;
9
+ return {
10
+ tables: Object.entries(tables).map(
11
+ ([tableName, tableInput]) => table(tableName, tableInput)
12
+ ),
13
+ tableModules: Object.entries(tableModules).map(
14
+ ([moduleName, moduleInput]) => module(moduleName, moduleInput)
15
+ ),
16
+ buckets: Object.entries(buckets).map(
17
+ ([bucketName, bucketInput]) => bucket(bucketName, bucketInput)
18
+ ),
19
+ authorities
20
+ };
21
+ }
22
+ function table(name, input) {
23
+ const { columns, indexes, formOptions, ...rest } = input;
24
+ const definition = {
25
+ ...rest,
26
+ name,
27
+ columns: Object.entries(columns).map(
28
+ ([columnName, columnInput]) => column(columnName, columnInput)
29
+ )
30
+ };
31
+ if (indexes) {
32
+ definition.indexes = indexes.map((index) => ({
33
+ ...index,
34
+ columns: index.columns.map((columnName) => columnName)
35
+ }));
36
+ }
37
+ if (formOptions) {
38
+ definition.formOptions = {
39
+ submissionColumns: Object.entries(formOptions.submissionColumns).map(
40
+ ([columnName, columnInput]) => column(columnName, columnInput)
41
+ )
42
+ };
43
+ }
44
+ return definition;
45
+ }
46
+ function module(name, input) {
47
+ return {
48
+ ...input,
49
+ name,
50
+ columns: Object.entries(input.columns).map(
51
+ ([columnName, columnInput]) => column(columnName, columnInput)
52
+ )
53
+ };
54
+ }
55
+ function column(name, input) {
56
+ if (isStringColumn(input)) {
57
+ const { pattern, ...rest } = input;
58
+ const definition = { ...rest, name };
59
+ if (pattern) {
60
+ definition.pattern = pattern instanceof RegExp ? pattern.source : pattern;
61
+ }
62
+ return definition;
63
+ }
64
+ return {
65
+ ...input,
66
+ name
67
+ };
68
+ }
69
+ function isStringColumn(column2) {
70
+ return column2.type === "string";
71
+ }
72
+ function bucket(name, input) {
73
+ return {
74
+ ...input,
75
+ name
76
+ };
77
+ }
78
+ export {
79
+ defineConfig
80
+ };
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const validateConfigCommand: Command;
3
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/config/validate/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,qBAAqB,SAqC9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function watchConfigFile(configPath: string, onFileChange: () => Promise<void>): import("chokidar").FSWatcher;
2
+ //# sourceMappingURL=watcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../../src/config/validate/watcher.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,gCA6ClC"}
@@ -0,0 +1,2 @@
1
+ export declare function generateAction(orizmConfigTs: string, destination: string): Promise<void>;
2
+ //# sourceMappingURL=action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/consumer/generate/action.ts"],"names":[],"mappings":"AAMA,wBAAsB,cAAc,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,iBAYpB"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const consumerGenerateCommand: Command;
3
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/consumer/generate/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,uBAAuB,SAUhC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function pullAction(options: {
2
+ destination: string;
3
+ envPath: string;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/consumer/pull/action.ts"],"names":[],"mappings":"AAOA,wBAAsB,UAAU,CAAC,OAAO,EAAE;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,iBAmBA"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const consumerPullCommand: Command;
3
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/consumer/pull/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,mBAAmB,SAa5B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ServerOrizmConfig } from "../../types";
2
+ export type GenerateOption = {
3
+ definition: ServerOrizmConfig;
4
+ output: string;
5
+ };
6
+ export declare function generate(options: GenerateOption): Promise<void>;
7
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/consumer/pull/generate.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,QAAQ,CAAC,OAAO,EAAE,cAAc,iBAKrD"}
@@ -0,0 +1,3 @@
1
+ export declare function hide(): void;
2
+ export declare function show(): void;
3
+ //# sourceMappingURL=cli-cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-cursor.d.ts","sourceRoot":"","sources":["../../src/lib/cli-cursor.ts"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,IAAI,IAAI,CAE3B;AAED,wBAAgB,IAAI,IAAI,IAAI,CAE3B"}
@@ -0,0 +1,2 @@
1
+ export declare function input(prompt: string): Promise<string>;
2
+ //# sourceMappingURL=cli-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-input.d.ts","sourceRoot":"","sources":["../../src/lib/cli-input.ts"],"names":[],"mappings":"AAEA,wBAAsB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAW3D"}
@@ -0,0 +1,13 @@
1
+ declare class Spinner {
2
+ private text;
3
+ private currentFrame;
4
+ private timer;
5
+ private isSpinning;
6
+ start(text?: string): Spinner;
7
+ stop(): Spinner;
8
+ succeed(text?: string): void;
9
+ private render;
10
+ }
11
+ export declare function createSpinner(): Spinner;
12
+ export {};
13
+ //# sourceMappingURL=cli-spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-spinner.d.ts","sourceRoot":"","sources":["../../src/lib/cli-spinner.ts"],"names":[],"mappings":"AAOA,cAAM,OAAO;IACX,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,UAAU,CAAkB;IAEpC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO;IAsB7B,IAAI,IAAI,OAAO;IAoBf,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IAM5B,OAAO,CAAC,MAAM;CASf;AAED,wBAAgB,aAAa,IAAI,OAAO,CAEvC"}
@@ -0,0 +1,3 @@
1
+ export declare const success: string;
2
+ export declare const error: string;
3
+ //# sourceMappingURL=cli-symbol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-symbol.d.ts","sourceRoot":"","sources":["../../src/lib/cli-symbol.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,QAAsB,CAAC;AAC3C,eAAO,MAAM,KAAK,QAAoB,CAAC"}
@@ -0,0 +1,16 @@
1
+ export declare class CliTable {
2
+ private headers;
3
+ private rows;
4
+ private columnWidths;
5
+ private rowColors;
6
+ constructor(headers: string[]);
7
+ addRow(row: string[], options?: {
8
+ color?: "green" | "red";
9
+ }): void;
10
+ private updateColumnWidths;
11
+ private createHorizontalLine;
12
+ private formatRow;
13
+ toString(): string;
14
+ print(): void;
15
+ }
16
+ //# sourceMappingURL=cli-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-table.d.ts","sourceRoot":"","sources":["../../src/lib/cli-table.ts"],"names":[],"mappings":"AASA,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,IAAI,CAAkB;IAC9B,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,SAAS,CAAyB;gBAE9B,OAAO,EAAE,MAAM,EAAE;IAMtB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;KAAE,GAAG,IAAI;IAmBzE,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,oBAAoB;IA4B5B,OAAO,CAAC,SAAS;IAeV,QAAQ,IAAI,MAAM;IA0BlB,KAAK,IAAI,IAAI;CAGrB"}
@@ -0,0 +1,7 @@
1
+ import { components } from "@orizm/private-api-clients/dev-v2";
2
+ import { DevAPIEnv } from "./load-env.js";
3
+ type ProjectDefinitionChangeEvent = components["schemas"]["OrizmConfigChangeEvents"];
4
+ export declare function applyDefinition(env: DevAPIEnv, projectDef: components["schemas"]["OrizmConfig"]): Promise<void>;
5
+ export declare const getChangeEvents: (env: DevAPIEnv, projectDef: components["schemas"]["OrizmConfig"]) => Promise<ProjectDefinitionChangeEvent>;
6
+ export {};
7
+ //# sourceMappingURL=developer-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"developer-api.d.ts","sourceRoot":"","sources":["../../src/lib/developer-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,KAAK,4BAA4B,GAC/B,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAC;AAEnD,wBAAsB,eAAe,CACnC,GAAG,EAAE,SAAS,EACd,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,GAC/C,OAAO,CAAC,IAAI,CAAC,CA0Bf;AAED,eAAO,MAAM,eAAe,QACrB,SAAS,cACF,UAAU,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,KAC/C,OAAO,CAAC,4BAA4B,CA4BtC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { components } from "@orizm/private-api-clients/dev-v2";
2
+ type ProjectDefinitionChangeEvent = components["schemas"]["OrizmConfigChangeEvents"];
3
+ export declare function displayChangeEvents(changeEvents: ProjectDefinitionChangeEvent): Promise<void>;
4
+ export {};
5
+ //# sourceMappingURL=display-change-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-change-events.d.ts","sourceRoot":"","sources":["../../src/lib/display-change-events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D,KAAK,4BAA4B,GAC/B,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAC;AAMnD,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,4BAA4B,GACzC,OAAO,CAAC,IAAI,CAAC,CAqBf"}
@@ -0,0 +1,6 @@
1
+ import * as v from "valibot";
2
+ export declare function displayValibotError(error: unknown): void;
3
+ export declare function buildValiErrorMessage(e: v.ValiError<v.GenericSchema | v.GenericSchemaAsync>, options?: {
4
+ color?: boolean;
5
+ }): string;
6
+ //# sourceMappingURL=display-valibot-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-valibot-error.d.ts","sourceRoot":"","sources":["../../src/lib/display-valibot-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAOxD;AAED,wBAAgB,qBAAqB,CACnC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,kBAAkB,CAAC,EACtD,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5B,MAAM,CASR"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=display-valibot-error.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-valibot-error.test.d.ts","sourceRoot":"","sources":["../../src/lib/display-valibot-error.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { ServerProjectDefinition } from "../types";
2
+ export declare function fetchCurrentDefinition(options: {
3
+ baseUrl: string;
4
+ apiKey: string;
5
+ projectName: string;
6
+ }): Promise<ServerProjectDefinition>;
7
+ //# sourceMappingURL=fetch-current-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-current-definition.d.ts","sourceRoot":"","sources":["../../src/lib/fetch-current-definition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,wBAAsB,sBAAsB,CAAC,OAAO,EAAE;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA4CnC"}
@@ -0,0 +1,2 @@
1
+ export declare function handleError(error: unknown): void;
2
+ //# sourceMappingURL=handle-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-error.d.ts","sourceRoot":"","sources":["../../src/lib/handle-error.ts"],"names":[],"mappings":"AAKA,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAsBhD"}
@@ -0,0 +1,3 @@
1
+ import { ServerOrizmConfig } from "../types.js";
2
+ export declare function loadConfig(configFile: string): Promise<ServerOrizmConfig>;
3
+ //# sourceMappingURL=load-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../../src/lib/load-config.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,wBAAsB,UAAU,CAC9B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,iBAAiB,CAAC,CAiB5B"}
@@ -0,0 +1,10 @@
1
+ import * as v from "valibot";
2
+ declare const EnvSchema: v.ObjectSchema<{
3
+ readonly ORIZM_PROJECT: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "ORIZM_PROJECT is required">, v.BrandAction<string, "ORIZM_PROJECT">]>;
4
+ readonly ORIZM_BASE_URL: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, "https://app.orizm.com">, v.TransformAction<string, string>, v.BrandAction<string, "ORIZM_BASE_URL">]>;
5
+ readonly ORIZM_API_KEY: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "ORIZM_API_KEY is required">, v.BrandAction<string, "ORIZM_API_KEY">]>;
6
+ }, undefined>;
7
+ export type DevAPIEnv = v.InferOutput<typeof EnvSchema>;
8
+ export declare function loadEnv(envPath?: string): Promise<DevAPIEnv>;
9
+ export {};
10
+ //# sourceMappingURL=load-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-env.d.ts","sourceRoot":"","sources":["../../src/lib/load-env.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAK7B,QAAA,MAAM,SAAS;;;;aAgBb,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,SAAS,CAAC,CAAC;AAExD,wBAAsB,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAsClE"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const pushCommand: Command;
3
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/push/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,WAAW,SAgDpB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { components } from "@orizm/private-api-clients/dev-v2";
2
+ import { ModuleColumnDef, ReferenceColumnDef, OrizmConfigDef, TableDef, IndexDef, BucketDef, TableModuleDef, FormOptionsDef, StringColumnDef, NumberColumnDef, BooleanColumnDef, JsonColumnDef, StorageColumnDef, AuthorityRulesDef, TableColumnDef, LiteralColumnDef } from "@orizm/common/config-validator";
3
+ export type ServerProjectDefinition = components["schemas"]["ProjectDefinition"];
4
+ export type ServerOrizmConfig = components["schemas"]["OrizmConfig"];
5
+ export type CommonOrizmConfig = OrizmConfigDef;
6
+ export type CommonBucketAccessControl = BucketDef["accessControl"];
7
+ export type CommonTableDefinition = TableDef;
8
+ export type CommonLiteralColumnDefinition = LiteralColumnDef;
9
+ export type CommonStringColumnDefinition = StringColumnDef;
10
+ export type CommonNumberColumnDefinition = NumberColumnDef;
11
+ export type CommonBooleanColumnDefinition = BooleanColumnDef;
12
+ export type CommonJsonColumnDefinition = JsonColumnDef;
13
+ export type CommonStorageColumnDefinition = StorageColumnDef;
14
+ export type CommonReferenceColumnDefinition = ReferenceColumnDef;
15
+ export type CommonModuleColumnDefinition = ModuleColumnDef;
16
+ export type CommonColumnDefinition = TableColumnDef;
17
+ export type CommonIndexDefinition = IndexDef;
18
+ export type CommonFormOptions = FormOptionsDef;
19
+ export type CommonTableModuleDefinition = TableModuleDef;
20
+ export type CommonBucketDefinition = BucketDef;
21
+ export type CommonAuthorityRulesDefinition = AuthorityRulesDef;
22
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AAGxC,MAAM,MAAM,uBAAuB,GACjC,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAC7C,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC;AAGrE,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAC/C,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;AACnE,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAC7D,MAAM,MAAM,4BAA4B,GAAG,eAAe,CAAC;AAC3D,MAAM,MAAM,4BAA4B,GAAG,eAAe,CAAC;AAC3D,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAC7D,MAAM,MAAM,0BAA0B,GAAG,aAAa,CAAC;AACvD,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAC7D,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC;AACjE,MAAM,MAAM,4BAA4B,GAAG,eAAe,CAAC;AAC3D,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC;AACpD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAC/C,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC;AACzD,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAC/C,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orizm/cli",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "Orizm CLI",
5
5
  "type": "module",
6
6
  "repository": {
@@ -8,18 +8,26 @@
8
8
  "url": "https://github.com/chot-Inc/superx.git",
9
9
  "directory": "packages/orizm-cli"
10
10
  },
11
+ "exports": {
12
+ "./config": {
13
+ "types": "./dist/config/index.d.ts",
14
+ "import": "./dist/config/index.js",
15
+ "require": "./dist/config/index.cjs"
16
+ }
17
+ },
11
18
  "files": [
12
19
  "bin",
13
20
  "dist"
14
21
  ],
15
22
  "dependencies": {
23
+ "chokidar": "^4.0.3",
16
24
  "cli-color": "^2.0.3",
17
25
  "commander": "^10.0.0",
18
26
  "dotenv": "^16.3.1",
19
27
  "esbuild": "^0.17.19",
20
28
  "handlebars": "^4.7.7",
21
29
  "valibot": "^1.0.0",
22
- "@orizm/common": "1.13.1"
30
+ "@orizm/common": "1.13.3"
23
31
  },
24
32
  "bin": {
25
33
  "orizm": "bin/index.js"
@@ -31,8 +39,14 @@
31
39
  },
32
40
  "license": "Apache-2.0",
33
41
  "scripts": {
34
- "dev": "tsup --watch",
35
- "build": "tsup",
36
- "typecheck": "tsc --noEmit"
42
+ "dev": "concurrently 'pnpm run dev:js' 'pnpm run dev:dts'",
43
+ "dev:js": "tsup --watch",
44
+ "dev:dts": "tsc --watch --emitDeclarationOnly",
45
+ "build": "concurrently 'pnpm run build:js' 'pnpm run build:dts'",
46
+ "build:js": "tsup",
47
+ "build:dts": "tsc --emitDeclarationOnly",
48
+ "typecheck": "tsc --noEmit",
49
+ "test": "vitest run",
50
+ "test:watch": "vitest run --watch"
37
51
  }
38
52
  }