@onexapis/cli 1.1.44 → 1.1.46

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/dist/index.d.mts CHANGED
@@ -38,6 +38,25 @@ interface BuildOptions {
38
38
  }
39
39
  declare function buildCommand(options: BuildOptions): Promise<void>;
40
40
 
41
+ /**
42
+ * `onexthm upload` is deprecated.
43
+ *
44
+ * It used to push bundle.zip / source.zip / latest.json directly to S3 via
45
+ * the AWS SDK. The platform no longer exposes themes via direct S3 access,
46
+ * so this path is broken by construction. The canonical replacement is
47
+ * `onexthm publish`, which:
48
+ *
49
+ * 1. Authenticates against the platform (`onexthm login`)
50
+ * 2. Registers the theme + version through the API
51
+ * 3. Receives presigned PUT URLs for bundle.zip, source.zip, and any
52
+ * content-hashed assets
53
+ * 4. Uploads everything via HTTP and confirms the publish
54
+ *
55
+ * This file is kept (rather than deleted) so existing CI scripts that call
56
+ * `onexthm upload` get a clear migration message instead of "command not
57
+ * found". After all consumers migrate, the command can be removed from
58
+ * cli.ts entirely.
59
+ */
41
60
  interface UploadOptions {
42
61
  theme?: string;
43
62
  bucket?: string;
@@ -47,42 +66,47 @@ interface UploadOptions {
47
66
  skipSource?: boolean;
48
67
  sourceDir?: string;
49
68
  }
50
- /**
51
- * Upload theme to S3 as zip files
52
- *
53
- * Creates bundle.zip (compiled output) and source.zip (theme source code),
54
- * then uploads both to S3. Much faster than uploading 100+ individual files.
55
- */
56
- declare function uploadCommand(options: UploadOptions): Promise<void>;
69
+ declare function uploadCommand(_options: UploadOptions): Promise<void>;
57
70
 
58
71
  interface DownloadOptions {
59
72
  themeId?: string;
60
73
  version?: string;
74
+ output?: string;
75
+ /** @deprecated kept for backwards-compat with older scripts; ignored. */
61
76
  bucket?: string;
77
+ /** @deprecated kept for backwards-compat with older scripts; ignored. */
62
78
  environment?: "staging" | "production";
63
- output?: string;
64
79
  }
65
80
  /**
66
- * Download theme from S3
81
+ * Download a published theme via the website-api Lambda endpoints.
67
82
  *
68
- * Downloads bundle.zip (single S3 request) and extracts all files locally.
69
- * Much faster than downloading 100+ individual files.
83
+ * This command no longer talks to S3 directly the platform now serves
84
+ * theme content through HTTP-only endpoints, so AWS credentials, bucket
85
+ * names, and region settings are no longer required. The legacy
86
+ * `--bucket` and `--environment` flags are accepted but ignored for
87
+ * backwards compatibility with existing scripts.
70
88
  */
71
89
  declare function downloadCommand(options: DownloadOptions): Promise<void>;
72
90
 
73
91
  interface CloneOptions {
74
92
  version?: string;
75
93
  output?: string;
94
+ /** @deprecated kept for backwards-compat with older scripts; ignored. */
76
95
  bucket?: string;
96
+ /** @deprecated kept for backwards-compat with older scripts; ignored. */
77
97
  environment?: "staging" | "production";
78
98
  install?: boolean;
79
99
  name?: string;
80
100
  }
81
101
  /**
82
- * Clone theme source code from S3
102
+ * Clone theme source code via the website-api.
83
103
  *
84
- * Downloads source.zip and extracts it to a local directory.
85
- * Asks the user for a new theme name to differentiate from the original.
104
+ * Calls the authenticated `/source` Lambda to get a presigned S3 URL,
105
+ * downloads the source.zip, and extracts it to a local directory. Asks
106
+ * the user for a new theme name to differentiate from the original.
107
+ *
108
+ * Requires login (`onexthm login`) — the source endpoint is JWT-gated
109
+ * because cloning grants access to a developer's full theme source.
86
110
  */
87
111
  declare function cloneCommand(themeName: string, options: CloneOptions): Promise<void>;
88
112
 
@@ -110,6 +134,11 @@ declare function renderTemplate(templatePath: string, data: Record<string, unkno
110
134
  * Write a file with directory creation
111
135
  */
112
136
  declare function writeFile(filePath: string, content: string): Promise<void>;
137
+ /**
138
+ * Get the templates directory
139
+ * Works in both development and production (bundled) environments
140
+ */
141
+ declare function getTemplatesDir(): string;
113
142
  /**
114
143
  * Copy template directory
115
144
  */
@@ -188,4 +217,4 @@ declare function validateCategory(category: string): boolean;
188
217
  */
189
218
  declare function getValidCategories(): string[];
190
219
 
191
- export { Logger, buildCommand, cloneCommand, copyTemplate, createBlockCommand, createComponentCommand, createSectionCommand, detectPackageManager, downloadCommand, ensureOneXProject, getFeaturesDir, getProjectRoot, getThemesDir, getValidCategories, initCommand, installDependencies, isOneXProject, listCommand, listThemes, logger, pathExists, renderTemplate, themeExists, toCamelCase, toKebabCase, toPascalCase, uploadCommand, validateCategory, validateName, validateThemeName, writeFile };
220
+ export { Logger, buildCommand, cloneCommand, copyTemplate, createBlockCommand, createComponentCommand, createSectionCommand, detectPackageManager, downloadCommand, ensureOneXProject, getFeaturesDir, getProjectRoot, getTemplatesDir, getThemesDir, getValidCategories, initCommand, installDependencies, isOneXProject, listCommand, listThemes, logger, pathExists, renderTemplate, themeExists, toCamelCase, toKebabCase, toPascalCase, uploadCommand, validateCategory, validateName, validateThemeName, writeFile };
package/dist/index.d.ts CHANGED
@@ -38,6 +38,25 @@ interface BuildOptions {
38
38
  }
39
39
  declare function buildCommand(options: BuildOptions): Promise<void>;
40
40
 
41
+ /**
42
+ * `onexthm upload` is deprecated.
43
+ *
44
+ * It used to push bundle.zip / source.zip / latest.json directly to S3 via
45
+ * the AWS SDK. The platform no longer exposes themes via direct S3 access,
46
+ * so this path is broken by construction. The canonical replacement is
47
+ * `onexthm publish`, which:
48
+ *
49
+ * 1. Authenticates against the platform (`onexthm login`)
50
+ * 2. Registers the theme + version through the API
51
+ * 3. Receives presigned PUT URLs for bundle.zip, source.zip, and any
52
+ * content-hashed assets
53
+ * 4. Uploads everything via HTTP and confirms the publish
54
+ *
55
+ * This file is kept (rather than deleted) so existing CI scripts that call
56
+ * `onexthm upload` get a clear migration message instead of "command not
57
+ * found". After all consumers migrate, the command can be removed from
58
+ * cli.ts entirely.
59
+ */
41
60
  interface UploadOptions {
42
61
  theme?: string;
43
62
  bucket?: string;
@@ -47,42 +66,47 @@ interface UploadOptions {
47
66
  skipSource?: boolean;
48
67
  sourceDir?: string;
49
68
  }
50
- /**
51
- * Upload theme to S3 as zip files
52
- *
53
- * Creates bundle.zip (compiled output) and source.zip (theme source code),
54
- * then uploads both to S3. Much faster than uploading 100+ individual files.
55
- */
56
- declare function uploadCommand(options: UploadOptions): Promise<void>;
69
+ declare function uploadCommand(_options: UploadOptions): Promise<void>;
57
70
 
58
71
  interface DownloadOptions {
59
72
  themeId?: string;
60
73
  version?: string;
74
+ output?: string;
75
+ /** @deprecated kept for backwards-compat with older scripts; ignored. */
61
76
  bucket?: string;
77
+ /** @deprecated kept for backwards-compat with older scripts; ignored. */
62
78
  environment?: "staging" | "production";
63
- output?: string;
64
79
  }
65
80
  /**
66
- * Download theme from S3
81
+ * Download a published theme via the website-api Lambda endpoints.
67
82
  *
68
- * Downloads bundle.zip (single S3 request) and extracts all files locally.
69
- * Much faster than downloading 100+ individual files.
83
+ * This command no longer talks to S3 directly the platform now serves
84
+ * theme content through HTTP-only endpoints, so AWS credentials, bucket
85
+ * names, and region settings are no longer required. The legacy
86
+ * `--bucket` and `--environment` flags are accepted but ignored for
87
+ * backwards compatibility with existing scripts.
70
88
  */
71
89
  declare function downloadCommand(options: DownloadOptions): Promise<void>;
72
90
 
73
91
  interface CloneOptions {
74
92
  version?: string;
75
93
  output?: string;
94
+ /** @deprecated kept for backwards-compat with older scripts; ignored. */
76
95
  bucket?: string;
96
+ /** @deprecated kept for backwards-compat with older scripts; ignored. */
77
97
  environment?: "staging" | "production";
78
98
  install?: boolean;
79
99
  name?: string;
80
100
  }
81
101
  /**
82
- * Clone theme source code from S3
102
+ * Clone theme source code via the website-api.
83
103
  *
84
- * Downloads source.zip and extracts it to a local directory.
85
- * Asks the user for a new theme name to differentiate from the original.
104
+ * Calls the authenticated `/source` Lambda to get a presigned S3 URL,
105
+ * downloads the source.zip, and extracts it to a local directory. Asks
106
+ * the user for a new theme name to differentiate from the original.
107
+ *
108
+ * Requires login (`onexthm login`) — the source endpoint is JWT-gated
109
+ * because cloning grants access to a developer's full theme source.
86
110
  */
87
111
  declare function cloneCommand(themeName: string, options: CloneOptions): Promise<void>;
88
112
 
@@ -110,6 +134,11 @@ declare function renderTemplate(templatePath: string, data: Record<string, unkno
110
134
  * Write a file with directory creation
111
135
  */
112
136
  declare function writeFile(filePath: string, content: string): Promise<void>;
137
+ /**
138
+ * Get the templates directory
139
+ * Works in both development and production (bundled) environments
140
+ */
141
+ declare function getTemplatesDir(): string;
113
142
  /**
114
143
  * Copy template directory
115
144
  */
@@ -188,4 +217,4 @@ declare function validateCategory(category: string): boolean;
188
217
  */
189
218
  declare function getValidCategories(): string[];
190
219
 
191
- export { Logger, buildCommand, cloneCommand, copyTemplate, createBlockCommand, createComponentCommand, createSectionCommand, detectPackageManager, downloadCommand, ensureOneXProject, getFeaturesDir, getProjectRoot, getThemesDir, getValidCategories, initCommand, installDependencies, isOneXProject, listCommand, listThemes, logger, pathExists, renderTemplate, themeExists, toCamelCase, toKebabCase, toPascalCase, uploadCommand, validateCategory, validateName, validateThemeName, writeFile };
220
+ export { Logger, buildCommand, cloneCommand, copyTemplate, createBlockCommand, createComponentCommand, createSectionCommand, detectPackageManager, downloadCommand, ensureOneXProject, getFeaturesDir, getProjectRoot, getTemplatesDir, getThemesDir, getValidCategories, initCommand, installDependencies, isOneXProject, listCommand, listThemes, logger, pathExists, renderTemplate, themeExists, toCamelCase, toKebabCase, toPascalCase, uploadCommand, validateCategory, validateName, validateThemeName, writeFile };