@happyvertical/smrt-cli 0.51.32 → 0.51.33

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 (139) hide show
  1. package/dist/{ApiKey-BZmbOTnL-DrxlAZO2.js → ApiKey-BZmbOTnL-B5lc6Wx3.js} +2 -2
  2. package/dist/ApiKeyCollection-Bfb_nw81-DC5iJ1mb.js +2 -0
  3. package/dist/AuditLogCollection-B1YonCAP-Bk3462Oa.js +2 -0
  4. package/dist/{NostrIdentity-n70E0vck-5rGYvFIY.js → NostrIdentity-n70E0vck-usXX4s_K.js} +3 -3
  5. package/dist/NostrIdentityCollection-Ca74dkaL-EMjWAg-m.js +2 -0
  6. package/dist/{OidcIdentity-K8V4u0CR-dzykFMgp.js → OidcIdentity-K8V4u0CR-BVLWjf-i.js} +2 -2
  7. package/dist/OidcIdentityCollection-gnrLoF08-BBZE53OW.js +2 -0
  8. package/dist/ProfileAssetCollection-CmbeSgDi-HoBqJG3G.js +2 -0
  9. package/dist/{ProfileCollection-DTT4KNpQ-C3tIYhbK.js → ProfileCollection-DTT4KNpQ-CBSNj-47.js} +25 -25
  10. package/dist/ProfileMetadataCollection-DxX_BJKV-CmmrJM8N.js +2 -0
  11. package/dist/{ProfileMetafieldCollection-CMKhVi2I-C6uF97rV.js → ProfileMetafieldCollection-CMKhVi2I-fJIfcATW.js} +1 -1
  12. package/dist/{ProfileRelationshipCollection-DUVgaIqf-DhrHpup7.js → ProfileRelationshipCollection-DUVgaIqf-CuZEerRb.js} +1 -1
  13. package/dist/{ProfileRelationshipTermCollection-DtA9OM23-aafuXvJi.js → ProfileRelationshipTermCollection-DtA9OM23-BUs2ORAN.js} +1 -1
  14. package/dist/{ProfileRelationshipType-BRiRka6t-CiAcDP3Y.js → ProfileRelationshipType-BRiRka6t-DFa-_Qqp.js} +1 -1
  15. package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-Y4bfpu34.js → ProfileRelationshipTypeCollection-BdXwd7Kf-CcvbhUWo.js} +1 -1
  16. package/dist/cli-generator.d.ts +243 -0
  17. package/dist/cli-generator.d.ts.map +1 -0
  18. package/dist/commands/config-export.d.ts +9 -0
  19. package/dist/commands/config-export.d.ts.map +1 -0
  20. package/dist/commands/db-command-utils.d.ts +24 -0
  21. package/dist/commands/db-command-utils.d.ts.map +1 -0
  22. package/dist/commands/db-diff.d.ts +8 -0
  23. package/dist/commands/db-diff.d.ts.map +1 -0
  24. package/dist/commands/db-drop-framework-base-tables.d.ts +28 -0
  25. package/dist/commands/db-drop-framework-base-tables.d.ts.map +1 -0
  26. package/dist/commands/db-generate.d.ts +9 -0
  27. package/dist/commands/db-generate.d.ts.map +1 -0
  28. package/dist/commands/db-history.d.ts +8 -0
  29. package/dist/commands/db-history.d.ts.map +1 -0
  30. package/dist/commands/db-materialize-tenant-hierarchy.d.ts +12 -0
  31. package/dist/commands/db-materialize-tenant-hierarchy.d.ts.map +1 -0
  32. package/dist/commands/db-migrate-actions.d.ts +338 -0
  33. package/dist/commands/db-migrate-actions.d.ts.map +1 -0
  34. package/dist/commands/db-migrate-agent-schedule-slugs.d.ts +3 -0
  35. package/dist/commands/db-migrate-agent-schedule-slugs.d.ts.map +1 -0
  36. package/dist/commands/db-migrate-int8.d.ts +11 -0
  37. package/dist/commands/db-migrate-int8.d.ts.map +1 -0
  38. package/dist/commands/db-migrate-ledger-accounts.d.ts +8 -0
  39. package/dist/commands/db-migrate-ledger-accounts.d.ts.map +1 -0
  40. package/dist/commands/db-migrate-null-equal-indexes.d.ts +3 -0
  41. package/dist/commands/db-migrate-null-equal-indexes.d.ts.map +1 -0
  42. package/dist/commands/db-migrate-uuid.d.ts +171 -0
  43. package/dist/commands/db-migrate-uuid.d.ts.map +1 -0
  44. package/dist/commands/db-orphans.d.ts +39 -0
  45. package/dist/commands/db-orphans.d.ts.map +1 -0
  46. package/dist/commands/db-parity.d.ts +70 -0
  47. package/dist/commands/db-parity.d.ts.map +1 -0
  48. package/dist/commands/db-permissions.d.ts +19 -0
  49. package/dist/commands/db-permissions.d.ts.map +1 -0
  50. package/dist/commands/db-prune.d.ts +70 -0
  51. package/dist/commands/db-prune.d.ts.map +1 -0
  52. package/dist/commands/db-rollback.d.ts +44 -0
  53. package/dist/commands/db-rollback.d.ts.map +1 -0
  54. package/dist/commands/db-status.d.ts +91 -0
  55. package/dist/commands/db-status.d.ts.map +1 -0
  56. package/dist/commands/dev-knowledge.d.ts +10 -0
  57. package/dist/commands/dev-knowledge.d.ts.map +1 -0
  58. package/dist/commands/dev-runtime.d.ts +14 -0
  59. package/dist/commands/dev-runtime.d.ts.map +1 -0
  60. package/dist/commands/dispatch.d.ts +11 -0
  61. package/dist/commands/dispatch.d.ts.map +1 -0
  62. package/dist/commands/docs-claude.d.ts +44 -0
  63. package/dist/commands/docs-claude.d.ts.map +1 -0
  64. package/dist/commands/export.d.ts +31 -0
  65. package/dist/commands/export.d.ts.map +1 -0
  66. package/dist/commands/generate.d.ts +12 -0
  67. package/dist/commands/generate.d.ts.map +1 -0
  68. package/dist/commands/git.d.ts +41 -0
  69. package/dist/commands/git.d.ts.map +1 -0
  70. package/dist/commands/gnode.d.ts +11 -0
  71. package/dist/commands/gnode.d.ts.map +1 -0
  72. package/dist/commands/index.d.ts +23 -0
  73. package/dist/commands/index.d.ts.map +1 -0
  74. package/dist/commands/init.d.ts +11 -0
  75. package/dist/commands/init.d.ts.map +1 -0
  76. package/dist/commands/json-validator.d.ts +155 -0
  77. package/dist/commands/json-validator.d.ts.map +1 -0
  78. package/dist/commands/migration-failure-analysis.d.ts +12 -0
  79. package/dist/commands/migration-failure-analysis.d.ts.map +1 -0
  80. package/dist/commands/playground.d.ts +8 -0
  81. package/dist/commands/playground.d.ts.map +1 -0
  82. package/dist/commands/postgres-timestamp-migration.d.ts +11 -0
  83. package/dist/commands/postgres-timestamp-migration.d.ts.map +1 -0
  84. package/dist/commands/runtime-check-command.d.ts +5 -0
  85. package/dist/commands/runtime-check-command.d.ts.map +1 -0
  86. package/dist/commands/schema-contract.d.ts +83 -0
  87. package/dist/commands/schema-contract.d.ts.map +1 -0
  88. package/dist/commands/sti-upgrade.d.ts +51 -0
  89. package/dist/commands/sti-upgrade.d.ts.map +1 -0
  90. package/dist/commands/utilities.d.ts +134 -0
  91. package/dist/commands/utilities.d.ts.map +1 -0
  92. package/dist/commands/validation-types.d.ts +119 -0
  93. package/dist/commands/validation-types.d.ts.map +1 -0
  94. package/dist/commands/workbench.d.ts +8 -0
  95. package/dist/commands/workbench.d.ts.map +1 -0
  96. package/dist/{commands-Aw8Wv-GM.js → commands-DjkVEXmb.js} +2 -2
  97. package/dist/config.d.ts +70 -0
  98. package/dist/config.d.ts.map +1 -0
  99. package/dist/discovery/index.d.ts +6 -0
  100. package/dist/discovery/index.d.ts.map +1 -0
  101. package/dist/discovery/manifest-discovery.d.ts +67 -0
  102. package/dist/discovery/manifest-discovery.d.ts.map +1 -0
  103. package/dist/discovery/manifest-identity.d.ts +10 -0
  104. package/dist/discovery/manifest-identity.d.ts.map +1 -0
  105. package/dist/{dist-DC1d_zi0.js → dist-CYBGFt2p.js} +4 -4
  106. package/dist/{dist-CcLtprDR.js → dist-DD9wiC0-.js} +25 -25
  107. package/dist/{dist-D4TtU64x.js → dist-DJ_WTzB9.js} +2 -2
  108. package/dist/{dist-DXDf5-e6.js → dist-iN1z9gzn.js} +3 -3
  109. package/dist/index.d.ts +9 -1
  110. package/dist/index.d.ts.map +1 -0
  111. package/dist/index.js +9 -9
  112. package/dist/loaders/class-loader.d.ts +53 -0
  113. package/dist/loaders/class-loader.d.ts.map +1 -0
  114. package/dist/loaders/git-loader.d.ts +36 -0
  115. package/dist/loaders/git-loader.d.ts.map +1 -0
  116. package/dist/loaders/index.d.ts +9 -0
  117. package/dist/loaders/index.d.ts.map +1 -0
  118. package/dist/loaders/local-loader.d.ts +23 -0
  119. package/dist/loaders/local-loader.d.ts.map +1 -0
  120. package/dist/loaders/npm-loader.d.ts +40 -0
  121. package/dist/loaders/npm-loader.d.ts.map +1 -0
  122. package/dist/loaders/template-loader.d.ts +62 -0
  123. package/dist/loaders/template-loader.d.ts.map +1 -0
  124. package/dist/{oidcProvisioningPrimitives-0-3n3D6f-D9PpE0-s.js → oidcProvisioningPrimitives-0-3n3D6f-CJHDoAXn.js} +4 -4
  125. package/dist/resolveIdentity-BrJDCjYi-1VmNML6W.js +2 -0
  126. package/dist/runtime-check.d.ts +19 -0
  127. package/dist/runtime-check.d.ts.map +1 -0
  128. package/dist/utils/generator.d.ts +48 -0
  129. package/dist/utils/generator.d.ts.map +1 -0
  130. package/dist/utils/index.d.ts +5 -0
  131. package/dist/utils/index.d.ts.map +1 -0
  132. package/package.json +10 -12
  133. package/dist/ApiKeyCollection-Bfb_nw81-DP5f5QpC.js +0 -2
  134. package/dist/AuditLogCollection-B1YonCAP-CZBxKq4A.js +0 -2
  135. package/dist/NostrIdentityCollection-Ca74dkaL-C6qq3z-e.js +0 -2
  136. package/dist/OidcIdentityCollection-gnrLoF08-CtNhKu9y.js +0 -2
  137. package/dist/ProfileAssetCollection-CmbeSgDi-C7T6rlyL.js +0 -2
  138. package/dist/ProfileMetadataCollection-DxX_BJKV-B3TOG70O.js +0 -2
  139. package/dist/resolveIdentity-BrJDCjYi-BafhqSQm.js +0 -2
package/dist/index.js CHANGED
@@ -49,63 +49,63 @@ var _playgroundCommands = null;
49
49
  var _workbenchCommands = null;
50
50
  async function getGnodeCommands() {
51
51
  if (!_gnodeCommands) {
52
- const { gnodeCommands } = await import("./commands-Aw8Wv-GM.js");
52
+ const { gnodeCommands } = await import("./commands-DjkVEXmb.js");
53
53
  _gnodeCommands = gnodeCommands;
54
54
  }
55
55
  return _gnodeCommands;
56
56
  }
57
57
  async function getGitCommands() {
58
58
  if (!_gitCommands) {
59
- const { gitCommands } = await import("./commands-Aw8Wv-GM.js");
59
+ const { gitCommands } = await import("./commands-DjkVEXmb.js");
60
60
  _gitCommands = gitCommands;
61
61
  }
62
62
  return _gitCommands;
63
63
  }
64
64
  async function getGenerateCommands() {
65
65
  if (!_generateCommands) {
66
- const { generateCommands } = await import("./commands-Aw8Wv-GM.js");
66
+ const { generateCommands } = await import("./commands-DjkVEXmb.js");
67
67
  _generateCommands = generateCommands;
68
68
  }
69
69
  return _generateCommands;
70
70
  }
71
71
  async function getInitCommands() {
72
72
  if (!_initCommands) {
73
- const { initCommands } = await import("./commands-Aw8Wv-GM.js");
73
+ const { initCommands } = await import("./commands-DjkVEXmb.js");
74
74
  _initCommands = initCommands;
75
75
  }
76
76
  return _initCommands;
77
77
  }
78
78
  async function getUtilityCommands() {
79
79
  if (!_utilityCommands) {
80
- const { utilityCommands } = await import("./commands-Aw8Wv-GM.js");
80
+ const { utilityCommands } = await import("./commands-DjkVEXmb.js");
81
81
  _utilityCommands = utilityCommands;
82
82
  }
83
83
  return _utilityCommands;
84
84
  }
85
85
  async function getDispatchCommands() {
86
86
  if (!_dispatchCommands) {
87
- const { dispatchCommands } = await import("./commands-Aw8Wv-GM.js");
87
+ const { dispatchCommands } = await import("./commands-DjkVEXmb.js");
88
88
  _dispatchCommands = dispatchCommands;
89
89
  }
90
90
  return _dispatchCommands;
91
91
  }
92
92
  async function getDocsCommands() {
93
93
  if (!_docsCommands) {
94
- const { docsCommands } = await import("./commands-Aw8Wv-GM.js");
94
+ const { docsCommands } = await import("./commands-DjkVEXmb.js");
95
95
  _docsCommands = docsCommands;
96
96
  }
97
97
  return _docsCommands;
98
98
  }
99
99
  async function getPlaygroundCommands() {
100
100
  if (!_playgroundCommands) {
101
- const { playgroundCommands } = await import("./commands-Aw8Wv-GM.js");
101
+ const { playgroundCommands } = await import("./commands-DjkVEXmb.js");
102
102
  _playgroundCommands = playgroundCommands;
103
103
  }
104
104
  return _playgroundCommands;
105
105
  }
106
106
  async function getWorkbenchCommands() {
107
107
  if (!_workbenchCommands) {
108
- const { workbenchCommands } = await import("./commands-Aw8Wv-GM.js");
108
+ const { workbenchCommands } = await import("./commands-DjkVEXmb.js");
109
109
  _workbenchCommands = workbenchCommands;
110
110
  }
111
111
  return _workbenchCommands;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Dynamic Class Loader for SMRT CLI
3
+ *
4
+ * Loads SMRT object classes from external packages at runtime,
5
+ * enabling CLI commands to work with objects from installed packages.
6
+ */
7
+ import type { SmrtCollection, SmrtObject } from '@happyvertical/smrt-core';
8
+ import type { SmartObjectDefinition, SmartObjectManifest } from '@happyvertical/smrt-core/scanner';
9
+ /**
10
+ * Dynamically-imported SMRT class references. The loader treats these as opaque
11
+ * constructor handles (registered/instantiated by the registry), so they are
12
+ * typed as the framework base-class constructors rather than `any`.
13
+ */
14
+ export interface LoadedClasses {
15
+ ObjectClass: typeof SmrtObject;
16
+ CollectionClass?: typeof SmrtCollection;
17
+ }
18
+ /**
19
+ * Dynamically load SMRT classes from external packages
20
+ */
21
+ export declare class DynamicClassLoader {
22
+ private loadedModules;
23
+ private classCache;
24
+ private verbose;
25
+ private logger;
26
+ constructor(options?: {
27
+ verbose?: boolean;
28
+ });
29
+ /**
30
+ * Load a class from package using manifest metadata
31
+ */
32
+ loadClass(objectDef: SmartObjectDefinition): Promise<LoadedClasses>;
33
+ /**
34
+ * Resolve import path with fallbacks
35
+ */
36
+ private resolveImportPath;
37
+ /**
38
+ * Load all classes from manifest
39
+ */
40
+ loadAllFromManifest(manifest: SmartObjectManifest): Promise<Map<string, LoadedClasses>>;
41
+ /**
42
+ * Clear all caches
43
+ */
44
+ clearCache(): void;
45
+ /**
46
+ * Get cache statistics
47
+ */
48
+ getStats(): {
49
+ modulesLoaded: number;
50
+ classesCached: number;
51
+ };
52
+ }
53
+ //# sourceMappingURL=class-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class-loader.d.ts","sourceRoot":"","sources":["../../src/loaders/class-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAE1C;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,OAAO,UAAU,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,cAAc,CAAC;CACzC;AAKD;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,aAAa,CAAsC;IAC3D,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,OAAO,CAAU;IAGzB,OAAO,CAAC,MAAM,CAAkC;gBAEpC,OAAO,GAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO;IAK/C;;OAEG;IACG,SAAS,CAAC,SAAS,EAAE,qBAAqB,GAAG,OAAO,CAAC,aAAa,CAAC;IAqEzE;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAgBzB;;OAEG;IACG,mBAAmB,CACvB,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAmBtC;;OAEG;IACH,UAAU,IAAI,IAAI;IAKlB;;OAEG;IACH,QAAQ,IAAI;QACV,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACvB;CAMF"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Git Repository Template Loader
3
+ *
4
+ * Downloads templates from git repositories without full git history.
5
+ * Similar to degit - downloads tarball of latest commit.
6
+ *
7
+ * Supports:
8
+ * - github:user/repo
9
+ * - github:user/repo/subdir#ref
10
+ * - gitlab:user/repo
11
+ * - https://github.com/user/repo.git
12
+ * - https://github.com/user/repo.git#ref:subdir
13
+ * - git@github.com:user/repo.git#ref:subdir
14
+ *
15
+ * Subdirectory syntax:
16
+ * - Shorthand: github:user/repo/path/to/subdir
17
+ * - Full URL: https://github.com/user/repo.git#branch:path/to/subdir
18
+ */
19
+ import type { TemplateConfig } from './template-loader.js';
20
+ /**
21
+ * Load template from git repository
22
+ */
23
+ export declare function loadGitTemplate(gitUrl: string): Promise<TemplateConfig>;
24
+ /**
25
+ * Get the template directory path (for copying overlay files)
26
+ *
27
+ * Prefers the subdir-resolved `__templateRoot` so that subdirectory templates
28
+ * (`github:user/repo/subdir`) overlay from the subdir rather than the repo root.
29
+ * Falls back to `__tempDir` for configs loaded before the field existed.
30
+ */
31
+ export declare function getGitTemplateDir(config: TemplateConfig): string;
32
+ /**
33
+ * Cleanup temporary directory after template is used
34
+ */
35
+ export declare function cleanupGitTemplate(config: TemplateConfig): Promise<void>;
36
+ //# sourceMappingURL=git-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-loader.d.ts","sourceRoot":"","sources":["../../src/loaders/git-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA8T3D;;GAEG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAsE7E;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAOhE;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC,CAKf"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Template Loaders - Export all template loading functionality
3
+ */
4
+ export { DynamicClassLoader, type LoadedClasses, } from './class-loader.js';
5
+ export { cleanupGitTemplate, getGitTemplateDir, loadGitTemplate, } from './git-loader.js';
6
+ export { loadLocalTemplate, resolveLocalPath, } from './local-loader.js';
7
+ export { discoverInstalledTemplates, findTemplateInPackages, loadNpmTemplate, resolveNpmPackage, } from './npm-loader.js';
8
+ export { loadTemplate, resolveTemplate, type TemplateConfig, type TemplateSource, } from './template-loader.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/loaders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Local Filesystem Template Loader
3
+ *
4
+ * Loads templates from local directories.
5
+ * Useful for development and testing.
6
+ */
7
+ import type { TemplateConfig } from './template-loader.js';
8
+ /**
9
+ * Resolve local path to absolute path
10
+ *
11
+ * Handles:
12
+ * - Relative paths (./path, ../path)
13
+ * - Absolute paths (/path)
14
+ * - Home directory (~/)
15
+ *
16
+ * Includes path traversal protection to prevent malicious paths
17
+ */
18
+ export declare function resolveLocalPath(localPath: string): Promise<string>;
19
+ /**
20
+ * Load template configuration from local directory
21
+ */
22
+ export declare function loadLocalTemplate(resolvedPath: string): Promise<TemplateConfig>;
23
+ //# sourceMappingURL=local-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-loader.d.ts","sourceRoot":"","sources":["../../src/loaders/local-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAkF3D;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBzE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,cAAc,CAAC,CAoCzB"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * NPM Package Template Loader
3
+ *
4
+ * Loads templates from installed npm packages.
5
+ * Supports package exports for template discovery.
6
+ */
7
+ import type { TemplateConfig } from './template-loader.js';
8
+ /**
9
+ * Resolve npm package path to template configuration
10
+ *
11
+ * Examples:
12
+ * - @happyvertical/praeco/templates/sveltekit
13
+ * - @org/templates
14
+ * - my-template-package
15
+ */
16
+ export declare function resolveNpmPackage(packagePath: string): Promise<string>;
17
+ /**
18
+ * Load template configuration from npm package
19
+ */
20
+ export declare function loadNpmTemplate(resolvedPath: string): Promise<TemplateConfig>;
21
+ /**
22
+ * Find template by short name in installed packages
23
+ *
24
+ * Searches for:
25
+ * - Scoped packages with templates directory
26
+ * - Scoped packages direct
27
+ * - Unscoped packages
28
+ */
29
+ export declare function findTemplateInPackages(shortName: string): Promise<string | null>;
30
+ /**
31
+ * Discover all templates in installed packages
32
+ *
33
+ * Useful for `smrt gnode list-templates` command
34
+ */
35
+ export declare function discoverInstalledTemplates(): Promise<Array<{
36
+ name: string;
37
+ source: string;
38
+ config: TemplateConfig;
39
+ }>>;
40
+ //# sourceMappingURL=npm-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npm-loader.d.ts","sourceRoot":"","sources":["../../src/loaders/npm-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAS3D;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmB5E;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,cAAc,CAAC,CA6CzB;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBxB;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CACzD,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,CAAC,CAChE,CA6CA"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Template Loader - Resolves and loads templates from various sources
3
+ *
4
+ * Supports:
5
+ * - npm packages (@org/pkg/templates/name)
6
+ * - Git repositories (github:user/repo, https://github.com/user/repo.git)
7
+ * - Local filesystem paths (../path/to/template, /absolute/path)
8
+ */
9
+ /**
10
+ * Context passed to placeholder functions
11
+ */
12
+ export interface PlaceholderContext {
13
+ name: string;
14
+ siteName: string;
15
+ location: string;
16
+ latitude: number;
17
+ longitude: number;
18
+ timezone: string;
19
+ }
20
+ export interface TemplateConfig {
21
+ name: string;
22
+ description: string;
23
+ framework: string;
24
+ baseGenerator?: {
25
+ command: string;
26
+ args: string[];
27
+ skipPrompts?: boolean;
28
+ };
29
+ dependencies: Record<string, string>;
30
+ devDependencies: Record<string, string>;
31
+ /** Template directory relative to config file (defaults to 'template') */
32
+ templateDir?: string;
33
+ /** Placeholder substitution map */
34
+ placeholders?: Record<string, string | ((ctx: PlaceholderContext) => string)>;
35
+ /** Post-generation hooks */
36
+ hooks?: {
37
+ afterGenerate?: (ctx: PlaceholderContext) => Promise<void>;
38
+ };
39
+ }
40
+ export interface TemplateSource {
41
+ type: 'npm' | 'git' | 'local';
42
+ location: string;
43
+ resolved: string;
44
+ }
45
+ /**
46
+ * Resolve a template name to a specific source
47
+ *
48
+ * @param name - Template name or path
49
+ * - @org/pkg/templates/name (npm package)
50
+ * - github:user/repo (git shorthand)
51
+ * - https://github.com/user/repo.git (git URL)
52
+ * - ../path/to/template (local path)
53
+ * - short-name (searches installed packages)
54
+ *
55
+ * @returns Template source information
56
+ */
57
+ export declare function resolveTemplate(name: string): Promise<TemplateSource>;
58
+ /**
59
+ * Load template configuration from resolved source
60
+ */
61
+ export declare function loadTemplate(source: TemplateSource): Promise<TemplateConfig>;
62
+ //# sourceMappingURL=template-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-loader.d.ts","sourceRoot":"","sources":["../../src/loaders/template-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAmBH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,kBAAkB,KAAK,MAAM,CAAC,CAAC,CAAC;IAC9E,4BAA4B;IAC5B,KAAK,CAAC,EAAE;QACN,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KAC5D,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAkE3E;AA2DD;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,cAAc,CAAC,CAWzB"}
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { s as isSystemContext } from "./dist-D4TtU64x.js";
3
- import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-5rGYvFIY.js";
4
- import { t as OidcIdentity } from "./OidcIdentity-K8V4u0CR-dzykFMgp.js";
5
- import { c as saveOidcRaceArbiter, i as ProfileType, n as ProfileCollection, t as Profile } from "./ProfileCollection-DTT4KNpQ-C3tIYhbK.js";
2
+ import { s as isSystemContext } from "./dist-DJ_WTzB9.js";
3
+ import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-usXX4s_K.js";
4
+ import { t as OidcIdentity } from "./OidcIdentity-K8V4u0CR-BVLWjf-i.js";
5
+ import { c as saveOidcRaceArbiter, i as ProfileType, n as ProfileCollection, t as Profile } from "./ProfileCollection-DTT4KNpQ-CBSNj-47.js";
6
6
  import { SmrtCollection, smrt } from "@happyvertical/smrt-core";
7
7
  //#region ../profiles/dist/chunks/oidcProvisioningPrimitives-0-3n3D6f.js
8
8
  var oidcProvisioningPrimitives_0_3n3D6f_exports = /* @__PURE__ */ __exportAll({
@@ -0,0 +1,2 @@
1
+ import { i as resolveIdentity_exports } from "./dist-DD9wiC0-.js";
2
+ export { resolveIdentity_exports as i };
@@ -0,0 +1,19 @@
1
+ type RuntimeCheckSeverity = 'error' | 'warning' | 'pass';
2
+ export interface RuntimeCheckFinding {
3
+ severity: RuntimeCheckSeverity;
4
+ code: string;
5
+ message: string;
6
+ }
7
+ export interface RuntimeCheckResult {
8
+ projectRoot: string;
9
+ projectManifestPath?: string;
10
+ projectPackageName?: string;
11
+ discoveredManifestCount: number;
12
+ findings: RuntimeCheckFinding[];
13
+ }
14
+ export declare function runRuntimeCheck(projectRoot?: string): Promise<RuntimeCheckResult>;
15
+ export declare function formatRuntimeCheckReport(result: RuntimeCheckResult, options?: {
16
+ heading?: boolean;
17
+ }): string;
18
+ export {};
19
+ //# sourceMappingURL=runtime-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-check.d.ts","sourceRoot":"","sources":["../src/runtime-check.ts"],"names":[],"mappings":"AAsBA,KAAK,oBAAoB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAs1BD,wBAAsB,eAAe,CACnC,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,kBAAkB,CAAC,CAsG7B;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAClC,MAAM,CA6CR"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Template Generator Utilities
3
+ *
4
+ * Handles template instantiation:
5
+ * - Run base generators (SvelteKit, Next.js, etc.)
6
+ * - Overlay template files
7
+ * - Merge package.json dependencies
8
+ */
9
+ import type { TemplateConfig, TemplateSource } from '../loaders/index.js';
10
+ export interface SiteGeneratorOptions {
11
+ /** Site location name (e.g., "Bentley, AB") */
12
+ location?: string;
13
+ /** Latitude coordinate */
14
+ latitude?: number;
15
+ /** Longitude coordinate */
16
+ longitude?: number;
17
+ /** IANA timezone (e.g., "America/Edmonton") */
18
+ timezone?: string;
19
+ }
20
+ export interface GeneratorOptions {
21
+ template: string;
22
+ name: string;
23
+ outputDir: string;
24
+ /** Site-specific options for placeholder substitution */
25
+ site?: SiteGeneratorOptions;
26
+ }
27
+ /**
28
+ * Generate project from template
29
+ */
30
+ export declare function generate(source: TemplateSource, config: TemplateConfig, options: GeneratorOptions): Promise<void>;
31
+ /**
32
+ * Context object passed to placeholder functions
33
+ */
34
+ export interface PlaceholderContext {
35
+ /** Project name (e.g., "my-town-site") */
36
+ name: string;
37
+ /** Pretty site name derived from project name (e.g., "My Town Site") */
38
+ siteName: string;
39
+ /** Location name (e.g., "Bentley, AB") */
40
+ location: string;
41
+ /** Latitude coordinate */
42
+ latitude: number;
43
+ /** Longitude coordinate */
44
+ longitude: number;
45
+ /** IANA timezone */
46
+ timezone: string;
47
+ }
48
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/utils/generator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACnC,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAgCf;AAmPD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * CLI Utilities - Export all utility functions
3
+ */
4
+ export { type GeneratorOptions, generate } from './generator.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,gBAAgB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-cli",
3
- "version": "0.51.32",
3
+ "version": "0.51.33",
4
4
  "description": "Developer CLI for SMRT framework - introspection, testing, and project management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,14 +28,14 @@
28
28
  "@happyvertical/ai": "^0.94.1",
29
29
  "@happyvertical/files": "^0.94.1",
30
30
  "@happyvertical/logger": "^0.94.1",
31
- "@happyvertical/smrt-agents": "0.51.32",
32
- "@happyvertical/smrt-config": "0.51.32",
33
- "@happyvertical/smrt-core": "0.51.32",
34
- "@happyvertical/smrt-dev-mcp": "0.51.32",
35
- "@happyvertical/smrt-ledgers": "0.51.32",
36
- "@happyvertical/smrt-playground": "0.51.32",
37
- "@happyvertical/smrt-types": "0.51.32",
38
- "@happyvertical/smrt-users": "0.51.32",
31
+ "@happyvertical/smrt-agents": "0.51.33",
32
+ "@happyvertical/smrt-config": "0.51.33",
33
+ "@happyvertical/smrt-core": "0.51.33",
34
+ "@happyvertical/smrt-dev-mcp": "0.51.33",
35
+ "@happyvertical/smrt-ledgers": "0.51.33",
36
+ "@happyvertical/smrt-playground": "0.51.33",
37
+ "@happyvertical/smrt-types": "0.51.33",
38
+ "@happyvertical/smrt-users": "0.51.33",
39
39
  "@happyvertical/sql": "^0.94.1",
40
40
  "@happyvertical/utils": "^0.94.1",
41
41
  "acorn": "^8.18.0",
@@ -43,12 +43,10 @@
43
43
  "tar": "^7.5.22"
44
44
  },
45
45
  "devDependencies": {
46
- "@microsoft/api-extractor": "7.59.1",
47
46
  "@types/node": "24.13.6",
48
47
  "tsx": "^4.23.13",
49
- "typescript": "5.9.3",
48
+ "typescript": "6.0.3",
50
49
  "vite": "8.1.4",
51
- "vite-plugin-dts": "5.1.0",
52
50
  "vitest": "4.1.10"
53
51
  },
54
52
  "keywords": [
@@ -1,2 +0,0 @@
1
- import { j as ApiKeyCollection_exports } from "./dist-CcLtprDR.js";
2
- export { ApiKeyCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { k as AuditLogCollection_exports } from "./dist-CcLtprDR.js";
2
- export { AuditLogCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { E as NostrIdentityCollection_exports } from "./dist-CcLtprDR.js";
2
- export { NostrIdentityCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { w as OidcIdentityCollection_exports } from "./dist-CcLtprDR.js";
2
- export { OidcIdentityCollection_exports as r };
@@ -1,2 +0,0 @@
1
- import { x as ProfileAssetCollection_exports } from "./dist-CcLtprDR.js";
2
- export { ProfileAssetCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { v as ProfileMetadataCollection_exports } from "./dist-CcLtprDR.js";
2
- export { ProfileMetadataCollection_exports as n };
@@ -1,2 +0,0 @@
1
- import { i as resolveIdentity_exports } from "./dist-CcLtprDR.js";
2
- export { resolveIdentity_exports as i };