@42ws/cli 0.0.13 → 0.0.15
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/README.md +50 -1
- package/dist/commands/collections.d.ts +15 -0
- package/dist/commands/collections.d.ts.map +1 -0
- package/dist/commands/collections.js +256 -0
- package/dist/commands/collections.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,9 +39,52 @@ Options:
|
|
|
39
39
|
- `--build <cmd>` — Build command to run before publishing
|
|
40
40
|
- `--no-build` — Skip the build step
|
|
41
41
|
- `--message <text>` — Deployment message
|
|
42
|
-
- `--yes` — Skip confirmation prompts
|
|
42
|
+
- `--yes` — Skip non-destructive confirmation prompts
|
|
43
|
+
- `--allow-detach` — Allow publish even when it would remove an embedded form
|
|
43
44
|
- `--json` — Output results as JSON
|
|
44
45
|
|
|
46
|
+
Embed protection: if any AI-imported form is linked to this site (`linkedSite`), the CLI refuses to publish when the local source no longer contains the embed snippet (looking for `data-api-key="<form-key>"`). Use `--allow-detach` to override.
|
|
47
|
+
|
|
48
|
+
### `42ws pull`
|
|
49
|
+
|
|
50
|
+
Download the live published files of a site to a local directory. Useful before re-publishing a site that has linked forms — pull, merge your changes, then publish.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
42ws pull --site my-site --dir ./live
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `42ws sites`
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
42ws sites list
|
|
60
|
+
42ws sites create <name>
|
|
61
|
+
42ws sites delete <name> --force
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`sites delete` is destructive and requires `--force` (not just `--yes`). If the site has linked forms, the CLI prints them and asks whether to also delete them. Use `--delete-forms` / `--keep-forms` for non-interactive control.
|
|
65
|
+
|
|
66
|
+
### `42ws forms import`
|
|
67
|
+
|
|
68
|
+
Extract a form from existing HTML and create a 42ws form (Claude Haiku is used to identify fields, theme color, and CSS).
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
42ws forms import --site my-site --page contact.html --notify you@example.com --inject
|
|
72
|
+
42ws forms import --url https://example.com/contact --notify you@example.com
|
|
73
|
+
42ws forms import --file ./contact.html --notify you@example.com --inject
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Source (one required):
|
|
77
|
+
- `--site <name> --page <html>` — Pull from a 42ws-hosted site page
|
|
78
|
+
- `--url <url>` — Fetch from any URL
|
|
79
|
+
- `--file <path>` — Read from a local HTML file
|
|
80
|
+
|
|
81
|
+
Options:
|
|
82
|
+
- `--notify <email>` — Notification email (required)
|
|
83
|
+
- `--name <name>` — Override the AI-extracted form name
|
|
84
|
+
- `--inject` — Replace the source `<form>` with the embed snippet
|
|
85
|
+
- `--site` mode: re-publishes the page
|
|
86
|
+
- `--file` mode: overwrites the local file
|
|
87
|
+
|
|
45
88
|
### `42ws whoami`
|
|
46
89
|
|
|
47
90
|
Show the currently logged-in user.
|
|
@@ -50,6 +93,10 @@ Show the currently logged-in user.
|
|
|
50
93
|
42ws whoami
|
|
51
94
|
```
|
|
52
95
|
|
|
96
|
+
## Localization
|
|
97
|
+
|
|
98
|
+
The CLI auto-detects locale from `LANG` / `LC_ALL` env vars and falls back to the OS locale via `Intl`. Override explicitly with `--lang ja` or `--lang en`. Currently supports English and Japanese.
|
|
99
|
+
|
|
53
100
|
## Configuration file
|
|
54
101
|
|
|
55
102
|
Place a `42ws.json` in your project root:
|
|
@@ -129,6 +176,8 @@ npx @42ws/cli@latest publish --yes --json
|
|
|
129
176
|
| `BLOCKED_FILE` | Secret file would be uploaded | Remove the file or add to `.gitignore` |
|
|
130
177
|
| `BUILD_FAILED` | Build command exited non-zero | Fix the build error first |
|
|
131
178
|
| `FORBIDDEN` | License not enabled or not site owner | Ask the account owner |
|
|
179
|
+
| `EMBED_DETACH_BLOCKED` | Publish would remove an embedded form | Pull the live first (`42ws pull`) and merge, or pass `--allow-detach` |
|
|
180
|
+
| `CONFIRMATION_REQUIRED` | Destructive op needs explicit confirmation | Add `--force` |
|
|
132
181
|
|
|
133
182
|
### Suggested user-facing prompt
|
|
134
183
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface CollectionsArgs {
|
|
2
|
+
subcommand?: string;
|
|
3
|
+
positional: string[];
|
|
4
|
+
json?: boolean;
|
|
5
|
+
site?: string;
|
|
6
|
+
page?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
file?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
slug?: string;
|
|
11
|
+
inject?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function collections(args: CollectionsArgs): Promise<void>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/commands/collections.ts"],"names":[],"mappings":"AA+BA,UAAU,eAAe;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAoBD,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAStE"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { loadConfig } from '../lib/config.js';
|
|
4
|
+
import { apiRequest, ApiError } from '../lib/api.js';
|
|
5
|
+
import { info, success, successMessage, error, warn, isJsonMode } from '../lib/output.js';
|
|
6
|
+
import { t } from '../lib/i18n.js';
|
|
7
|
+
const COLLECTIONS_HELP = `
|
|
8
|
+
42ws collections — Manage CMS collections
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
42ws collections import [options] Generate a collection from a page and create it
|
|
12
|
+
|
|
13
|
+
Import sources (one required):
|
|
14
|
+
--site <name> --page <html> Import from a 42ws-hosted site page (recommended)
|
|
15
|
+
--url <url> Import from any URL
|
|
16
|
+
--file <path> Import from a local HTML file
|
|
17
|
+
|
|
18
|
+
Import options:
|
|
19
|
+
--name <name> Collection name (default: AI-suggested)
|
|
20
|
+
--slug <slug> URL slug (default: derived from name)
|
|
21
|
+
--inject Rewrite source HTML to embed the collection
|
|
22
|
+
(--site mode: re-publishes the page)
|
|
23
|
+
(--file mode: overwrites the local file)
|
|
24
|
+
--json Output result as JSON
|
|
25
|
+
|
|
26
|
+
Examples:
|
|
27
|
+
42ws collections import --site mysite --page news.html --inject
|
|
28
|
+
42ws collections import --file ./news.html --inject
|
|
29
|
+
`.trim();
|
|
30
|
+
export async function collections(args) {
|
|
31
|
+
const sub = args.subcommand;
|
|
32
|
+
if (!sub || sub === '--help' || sub === 'help') {
|
|
33
|
+
process.stdout.write(COLLECTIONS_HELP + '\n');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (sub === 'import')
|
|
37
|
+
return collectionsImport(args);
|
|
38
|
+
process.stderr.write(`Unknown collections subcommand: ${sub}\n\n${COLLECTIONS_HELP}\n`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
// AI が返した CSS セレクタで要素全体を置換/除去するシンプルな実装。
|
|
42
|
+
// 対応: `#id`, `tag#id`, `.class`, `tag.class`, `tag` のみ。複雑なセレクタは未対応で fallback する。
|
|
43
|
+
function replaceElement(html, selector, replacement) {
|
|
44
|
+
const parts = parseSimpleSelector(selector);
|
|
45
|
+
if (!parts)
|
|
46
|
+
return null;
|
|
47
|
+
const { tag, id, cls } = parts;
|
|
48
|
+
const tagPattern = tag ?? '\\w+';
|
|
49
|
+
let attrPattern = '';
|
|
50
|
+
if (id)
|
|
51
|
+
attrPattern += `[^>]*\\bid=["']${escapeRegExp(id)}["']`;
|
|
52
|
+
if (cls)
|
|
53
|
+
attrPattern += `[^>]*\\bclass=["'][^"']*\\b${escapeRegExp(cls)}\\b[^"']*["']`;
|
|
54
|
+
const re = new RegExp(`<(${tagPattern})(${attrPattern || '[^>]*'})>([\\s\\S]*?)</\\1>`, 'i');
|
|
55
|
+
if (!re.test(html))
|
|
56
|
+
return null;
|
|
57
|
+
return html.replace(re, replacement);
|
|
58
|
+
}
|
|
59
|
+
function parseSimpleSelector(sel) {
|
|
60
|
+
const trimmed = sel.trim();
|
|
61
|
+
// ID: #foo or tag#foo
|
|
62
|
+
const idMatch = trimmed.match(/^([a-zA-Z]\w*)?#([\w-]+)$/);
|
|
63
|
+
if (idMatch)
|
|
64
|
+
return { tag: idMatch[1], id: idMatch[2] };
|
|
65
|
+
// class: .foo or tag.foo
|
|
66
|
+
const clsMatch = trimmed.match(/^([a-zA-Z]\w*)?\.([\w-]+)$/);
|
|
67
|
+
if (clsMatch)
|
|
68
|
+
return { tag: clsMatch[1], cls: clsMatch[2] };
|
|
69
|
+
// tag only
|
|
70
|
+
const tagMatch = trimmed.match(/^([a-zA-Z]\w*)$/);
|
|
71
|
+
if (tagMatch)
|
|
72
|
+
return { tag: tagMatch[1] };
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
function escapeRegExp(s) {
|
|
76
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
77
|
+
}
|
|
78
|
+
function injectEmbedIntoHtml(html, snippet, selector) {
|
|
79
|
+
if (selector) {
|
|
80
|
+
const r = replaceElement(html, selector, snippet);
|
|
81
|
+
if (r !== null)
|
|
82
|
+
return r;
|
|
83
|
+
}
|
|
84
|
+
const mainRe = /(<main\b[^>]*>)([\s\S]*?)(<\/main>)/i;
|
|
85
|
+
if (mainRe.test(html)) {
|
|
86
|
+
return html.replace(mainRe, (_m, open, _i, close) => `${open}\n${snippet}\n${close}`);
|
|
87
|
+
}
|
|
88
|
+
const bodyRe = /<\/body>/i;
|
|
89
|
+
if (bodyRe.test(html)) {
|
|
90
|
+
return html.replace(bodyRe, `${snippet}\n</body>`);
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
function buildPageShell(html, selector, removeSelectors) {
|
|
95
|
+
let working = html;
|
|
96
|
+
// detailRemoveSelectors: 該当要素を削除(best-effort)
|
|
97
|
+
for (const sel of removeSelectors ?? []) {
|
|
98
|
+
const removed = replaceElement(working, sel, '');
|
|
99
|
+
if (removed !== null)
|
|
100
|
+
working = removed;
|
|
101
|
+
}
|
|
102
|
+
// 一覧領域を CMS_CONTENT プレースホルダに
|
|
103
|
+
if (selector) {
|
|
104
|
+
const replaced = replaceElement(working, selector, '<!--CMS_CONTENT-->');
|
|
105
|
+
if (replaced !== null)
|
|
106
|
+
return replaced;
|
|
107
|
+
}
|
|
108
|
+
const mainRe = /(<main\b[^>]*>)([\s\S]*?)(<\/main>)/i;
|
|
109
|
+
if (mainRe.test(working)) {
|
|
110
|
+
return working.replace(mainRe, (_m, open, _i, close) => `${open}<!--CMS_CONTENT-->${close}`);
|
|
111
|
+
}
|
|
112
|
+
const bodyRe = /<\/body>/i;
|
|
113
|
+
if (bodyRe.test(working)) {
|
|
114
|
+
return working.replace(bodyRe, '<!--CMS_CONTENT--></body>');
|
|
115
|
+
}
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
function buildEmbedSnippet(collectionId) {
|
|
119
|
+
return `<div data-cms-target="${collectionId}"></div>\n<script src="https://dev.42ws.com/embed/collection.js" data-collection-id="${collectionId}" data-api-base="https://api.dev.42ws.com" data-target='[data-cms-target="${collectionId}"]'></script>`;
|
|
120
|
+
}
|
|
121
|
+
async function collectionsImport(args) {
|
|
122
|
+
const config = loadConfig();
|
|
123
|
+
if (!config.token) {
|
|
124
|
+
error('NOT_LOGGED_IN', t('notLoggedIn'), t('notLoggedIn.fix'));
|
|
125
|
+
process.exit(1);
|
|
126
|
+
}
|
|
127
|
+
const sourceCount = [args.site, args.url, args.file].filter(Boolean).length;
|
|
128
|
+
if (sourceCount === 0) {
|
|
129
|
+
error('SOURCE_REQUIRED', '取り込みソースを指定してください。', '--site <name> --page <html> / --url <url> / --file <path> のいずれか1つを指定。');
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
if (sourceCount > 1) {
|
|
133
|
+
error('MULTIPLE_SOURCES', '--site / --url / --file は同時に指定できません。', 'いずれか1つを選んでください。');
|
|
134
|
+
process.exit(1);
|
|
135
|
+
}
|
|
136
|
+
let importPayload;
|
|
137
|
+
let linkedSite;
|
|
138
|
+
let linkedPage;
|
|
139
|
+
let originalHtml;
|
|
140
|
+
if (args.site) {
|
|
141
|
+
if (!args.page) {
|
|
142
|
+
error('PAGE_REQUIRED', '--site と一緒に --page <html> を指定してください。', '例: --site mysite --page news.html');
|
|
143
|
+
process.exit(1);
|
|
144
|
+
}
|
|
145
|
+
const src = await apiRequest(config, 'GET', `/sites/${args.site}/source?page=${encodeURIComponent(args.page)}`);
|
|
146
|
+
importPayload = { html: src.html, baseUrl: `https://${args.site}.dev.42ws.com/${args.page}` };
|
|
147
|
+
linkedSite = args.site;
|
|
148
|
+
linkedPage = args.page;
|
|
149
|
+
originalHtml = src.html;
|
|
150
|
+
}
|
|
151
|
+
else if (args.url) {
|
|
152
|
+
importPayload = { url: args.url };
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
const filePath = resolve(process.cwd(), args.file);
|
|
156
|
+
if (!existsSync(filePath)) {
|
|
157
|
+
error('FILE_NOT_FOUND', `ファイルが見つかりません: ${filePath}`, '');
|
|
158
|
+
process.exit(1);
|
|
159
|
+
}
|
|
160
|
+
originalHtml = readFileSync(filePath, 'utf-8');
|
|
161
|
+
importPayload = { html: originalHtml };
|
|
162
|
+
}
|
|
163
|
+
info('AI 解析中...');
|
|
164
|
+
let extracted;
|
|
165
|
+
try {
|
|
166
|
+
extracted = await apiRequest(config, 'POST', '/v1/collections/generate', importPayload);
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
if (e instanceof ApiError)
|
|
170
|
+
error(e.code, e.message, e.suggestedFix);
|
|
171
|
+
else
|
|
172
|
+
error('GENERATE_FAILED', String(e), t('tryAgain'));
|
|
173
|
+
process.exit(1);
|
|
174
|
+
}
|
|
175
|
+
const name = args.name || extracted.name || 'コレクション';
|
|
176
|
+
info(`生成結果: ${name}`);
|
|
177
|
+
if (extracted.themeColor)
|
|
178
|
+
info(` themeColor: ${extracted.themeColor}`);
|
|
179
|
+
if (extracted.replaceTargetSelector)
|
|
180
|
+
info(` 対象セレクタ: ${extracted.replaceTargetSelector}`);
|
|
181
|
+
if (extracted.warnings && extracted.warnings.length > 0) {
|
|
182
|
+
warn('AI からの注意点:');
|
|
183
|
+
for (const w of extracted.warnings)
|
|
184
|
+
warn(` - ${w}`);
|
|
185
|
+
}
|
|
186
|
+
// pageShell + originalSourceHtml をビルド
|
|
187
|
+
const pageShell = originalHtml
|
|
188
|
+
? buildPageShell(originalHtml, extracted.replaceTargetSelector, extracted.detailRemoveSelectors)
|
|
189
|
+
: undefined;
|
|
190
|
+
info('コレクションを作成中...');
|
|
191
|
+
let created;
|
|
192
|
+
try {
|
|
193
|
+
created = await apiRequest(config, 'POST', '/v1/collections', {
|
|
194
|
+
name,
|
|
195
|
+
slug: args.slug,
|
|
196
|
+
indexTemplate: extracted.indexTemplate,
|
|
197
|
+
detailTemplate: extracted.detailTemplate,
|
|
198
|
+
themeColor: extracted.themeColor,
|
|
199
|
+
pageShell,
|
|
200
|
+
originalSourceHtml: originalHtml,
|
|
201
|
+
...(linkedSite ? { linkedSite, linkedPage } : {}),
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
catch (e) {
|
|
205
|
+
if (e instanceof ApiError)
|
|
206
|
+
error(e.code, e.message, e.suggestedFix);
|
|
207
|
+
else
|
|
208
|
+
error('CREATE_FAILED', String(e), t('tryAgain'));
|
|
209
|
+
process.exit(1);
|
|
210
|
+
}
|
|
211
|
+
const coll = created.collection;
|
|
212
|
+
const embedSnippet = buildEmbedSnippet(coll.id);
|
|
213
|
+
let injected = false;
|
|
214
|
+
if (args.inject && originalHtml) {
|
|
215
|
+
const newHtml = injectEmbedIntoHtml(originalHtml, embedSnippet, extracted.replaceTargetSelector);
|
|
216
|
+
if (!newHtml) {
|
|
217
|
+
warn('元ソースに置換ターゲットが見つかりません。--inject はスキップされました。');
|
|
218
|
+
}
|
|
219
|
+
else if (args.site && args.page) {
|
|
220
|
+
try {
|
|
221
|
+
await apiRequest(config, 'POST', `/sites/${args.site}/save-and-publish`, { html: newHtml, page: args.page });
|
|
222
|
+
info(`サイトを再公開しました: ${args.site}/${args.page}`);
|
|
223
|
+
injected = true;
|
|
224
|
+
}
|
|
225
|
+
catch (e) {
|
|
226
|
+
if (e instanceof ApiError)
|
|
227
|
+
warn(`サイト再公開に失敗: ${e.message}`);
|
|
228
|
+
else
|
|
229
|
+
warn(`サイト再公開に失敗: ${String(e)}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else if (args.file) {
|
|
233
|
+
const filePath = resolve(process.cwd(), args.file);
|
|
234
|
+
writeFileSync(filePath, newHtml, 'utf-8');
|
|
235
|
+
info(`ファイルを書き換えました: ${filePath}`);
|
|
236
|
+
injected = true;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (isJsonMode()) {
|
|
240
|
+
success({
|
|
241
|
+
collection: { id: coll.id, name: coll.name, slug: coll.slug, linkedSite: coll.linkedSite, linkedPage: coll.linkedPage },
|
|
242
|
+
embedSnippet,
|
|
243
|
+
injected,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
successMessage(`✓ コレクション作成: ${coll.name} (${coll.id})`);
|
|
248
|
+
successMessage(`管理画面: https://dev.42ws.com/collections/${coll.id}`);
|
|
249
|
+
if (!injected) {
|
|
250
|
+
info('');
|
|
251
|
+
info('埋め込みコード:');
|
|
252
|
+
process.stdout.write(embedSnippet + '\n');
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=collections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/commands/collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,CAAC,EAAE,MAAM,gBAAgB,CAAC;AAEnC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAC,IAAI,EAAE,CAAC;AAiCT,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAqB;IACrD,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC;IAC5B,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;QAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;QAC9C,OAAO;IACT,CAAC;IACD,IAAI,GAAG,KAAK,QAAQ;QAAE,OAAO,iBAAiB,CAAC,IAAI,CAAC,CA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,cAAc,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC1C,IAAI,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;YAClC,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;IACH,CAAC;IAED,IAAI,UAAU,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC;YACN,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;YACvH,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,cAAc,CAAC,eAAe,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACxD,cAAc,CAAC,0CAA0C,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QACpE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,IAAI,CAAC,EAAE,CAAC,CAAC;YACT,IAAI,CAAC,UAAU,CAAC,CAAC;YACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiGA,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA+I1C"}
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,13 @@ import { whoami } from './commands/whoami.js';
|
|
|
4
4
|
import { publish } from './commands/publish.js';
|
|
5
5
|
import { sites } from './commands/sites.js';
|
|
6
6
|
import { forms } from './commands/forms.js';
|
|
7
|
+
import { collections } from './commands/collections.js';
|
|
7
8
|
import { open } from './commands/open.js';
|
|
8
9
|
import { init } from './commands/init.js';
|
|
9
10
|
import { pull } from './commands/pull.js';
|
|
10
11
|
import { setJsonMode } from './lib/output.js';
|
|
11
12
|
import { setLocale } from './lib/i18n.js';
|
|
12
|
-
const VERSION = '0.0.
|
|
13
|
+
const VERSION = '0.0.15';
|
|
13
14
|
const HELP = `
|
|
14
15
|
42ws — Publish static sites in one command
|
|
15
16
|
|
|
@@ -26,6 +27,7 @@ Commands:
|
|
|
26
27
|
sites create <name> Create a new site
|
|
27
28
|
sites delete <name> Delete a site
|
|
28
29
|
forms import [options] Extract a form from HTML/URL/site and create it
|
|
30
|
+
collections import [opts] Generate a CMS collection from a page (AI) and create it
|
|
29
31
|
init Create 42ws.json interactively
|
|
30
32
|
open [name] Open site URL in browser
|
|
31
33
|
pull --site <name> Download published files locally
|
|
@@ -169,6 +171,23 @@ export async function main() {
|
|
|
169
171
|
});
|
|
170
172
|
break;
|
|
171
173
|
}
|
|
174
|
+
case 'collections': {
|
|
175
|
+
const subcommand = positional[0];
|
|
176
|
+
const subPositional = positional.slice(1);
|
|
177
|
+
await collections({
|
|
178
|
+
subcommand,
|
|
179
|
+
positional: subPositional,
|
|
180
|
+
json: flags['json'] === true,
|
|
181
|
+
site: flags['site'],
|
|
182
|
+
page: flags['page'],
|
|
183
|
+
url: flags['url'],
|
|
184
|
+
file: flags['file'],
|
|
185
|
+
name: flags['name'],
|
|
186
|
+
slug: flags['slug'],
|
|
187
|
+
inject: flags['inject'] === true,
|
|
188
|
+
});
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
172
191
|
case 'open':
|
|
173
192
|
await open({
|
|
174
193
|
name: positional[0] ?? flags['site'],
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;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