@joripspace/cli 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,137 +1,137 @@
1
- # Third-party notices
2
-
3
- JoripSpace CLI is licensed under MIT. The dependencies below retain their own licenses and copyrights.
4
- They are installed separately by npm, not bundled into the CLI tarball. These notices record the versions in package-lock.json; other installed versions retain their accompanying licenses.
5
-
6
- ## fflate 0.8.3 — MIT
7
-
8
- https://www.npmjs.com/package/fflate/v/0.8.3
9
-
10
- MIT License
11
-
12
- Copyright (c) 2026 Arjun Barrett
13
-
14
- Permission is hereby granted, free of charge, to any person obtaining a copy
15
- of this software and associated documentation files (the "Software"), to deal
16
- in the Software without restriction, including without limitation the rights
17
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
- copies of the Software, and to permit persons to whom the Software is
19
- furnished to do so, subject to the following conditions:
20
-
21
- The above copyright notice and this permission notice shall be included in all
22
- copies or substantial portions of the Software.
23
-
24
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- SOFTWARE.
31
-
32
- ## jsonc-parser 3.3.1 — MIT
33
-
34
- https://www.npmjs.com/package/jsonc-parser/v/3.3.1
35
-
36
- The MIT License (MIT)
37
-
38
- Copyright (c) Microsoft
39
-
40
- Permission is hereby granted, free of charge, to any person obtaining a copy
41
- of this software and associated documentation files (the "Software"), to deal
42
- in the Software without restriction, including without limitation the rights
43
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
- copies of the Software, and to permit persons to whom the Software is
45
- furnished to do so, subject to the following conditions:
46
-
47
- The above copyright notice and this permission notice shall be included in all
48
- copies or substantial portions of the Software.
49
-
50
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56
- SOFTWARE.
57
-
58
- ## smol-toml 1.9.1 — BSD-3-Clause
59
-
60
- https://www.npmjs.com/package/smol-toml/v/1.9.1
61
-
62
- Copyright (c) Squirrel Chat et al., All rights reserved.
63
-
64
- Redistribution and use in source and binary forms, with or without
65
- modification, are permitted provided that the following conditions are met:
66
-
67
- 1. Redistributions of source code must retain the above copyright notice, this
68
- list of conditions and the following disclaimer.
69
- 2. Redistributions in binary form must reproduce the above copyright notice,
70
- this list of conditions and the following disclaimer in the
71
- documentation and/or other materials provided with the distribution.
72
- 3. Neither the name of the copyright holder nor the names of its contributors
73
- may be used to endorse or promote products derived from this software without
74
- specific prior written permission.
75
-
76
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
77
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
78
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
79
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
80
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
81
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
82
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
83
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
84
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
85
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
86
-
87
- ## @napi-rs/keyring 2.1.2
88
-
89
- MIT License
90
-
91
- Copyright (c) 2020 N-API for Rust
92
-
93
- Permission is hereby granted, free of charge, to any person obtaining a copy
94
- of this software and associated documentation files (the "Software"), to deal
95
- in the Software without restriction, including without limitation the rights
96
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
97
- copies of the Software, and to permit persons to whom the Software is
98
- furnished to do so, subject to the following conditions:
99
-
100
- The above copyright notice and this permission notice shall be included in all
101
- copies or substantial portions of the Software.
102
-
103
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
104
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
105
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
106
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
107
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
108
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
109
- SOFTWARE.
110
-
111
- Platform binaries are npm dependencies; their bundled Rust dependency notices are included in each platform package's LICENSE.third-party.md. The Linux binary includes libdbus under AFL-2.1 OR GPL-2.0-or-later, with full license texts preserved in that dependency.
112
-
113
- ## ignore 7.0.12 — MIT
114
-
115
- https://www.npmjs.com/package/ignore/v/7.0.12
116
-
117
- Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
118
- http://kael.me/
119
-
120
- Permission is hereby granted, free of charge, to any person obtaining
121
- a copy of this software and associated documentation files (the
122
- "Software"), to deal in the Software without restriction, including
123
- without limitation the rights to use, copy, modify, merge, publish,
124
- distribute, sublicense, and/or sell copies of the Software, and to
125
- permit persons to whom the Software is furnished to do so, subject to
126
- the following conditions:
127
-
128
- The above copyright notice and this permission notice shall be
129
- included in all copies or substantial portions of the Software.
130
-
131
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
132
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
133
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
134
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
135
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
136
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ # Third-party notices
2
+
3
+ JoripSpace CLI is licensed under MIT. The dependencies below retain their own licenses and copyrights.
4
+ They are installed separately by npm, not bundled into the CLI tarball. These notices record the versions in package-lock.json; other installed versions retain their accompanying licenses.
5
+
6
+ ## fflate 0.8.3 — MIT
7
+
8
+ https://www.npmjs.com/package/fflate/v/0.8.3
9
+
10
+ MIT License
11
+
12
+ Copyright (c) 2026 Arjun Barrett
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+
32
+ ## jsonc-parser 3.3.1 — MIT
33
+
34
+ https://www.npmjs.com/package/jsonc-parser/v/3.3.1
35
+
36
+ The MIT License (MIT)
37
+
38
+ Copyright (c) Microsoft
39
+
40
+ Permission is hereby granted, free of charge, to any person obtaining a copy
41
+ of this software and associated documentation files (the "Software"), to deal
42
+ in the Software without restriction, including without limitation the rights
43
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
+ copies of the Software, and to permit persons to whom the Software is
45
+ furnished to do so, subject to the following conditions:
46
+
47
+ The above copyright notice and this permission notice shall be included in all
48
+ copies or substantial portions of the Software.
49
+
50
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56
+ SOFTWARE.
57
+
58
+ ## smol-toml 1.9.1 — BSD-3-Clause
59
+
60
+ https://www.npmjs.com/package/smol-toml/v/1.9.1
61
+
62
+ Copyright (c) Squirrel Chat et al., All rights reserved.
63
+
64
+ Redistribution and use in source and binary forms, with or without
65
+ modification, are permitted provided that the following conditions are met:
66
+
67
+ 1. Redistributions of source code must retain the above copyright notice, this
68
+ list of conditions and the following disclaimer.
69
+ 2. Redistributions in binary form must reproduce the above copyright notice,
70
+ this list of conditions and the following disclaimer in the
71
+ documentation and/or other materials provided with the distribution.
72
+ 3. Neither the name of the copyright holder nor the names of its contributors
73
+ may be used to endorse or promote products derived from this software without
74
+ specific prior written permission.
75
+
76
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
77
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
78
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
79
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
80
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
81
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
82
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
83
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
84
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
85
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
86
+
87
+ ## @napi-rs/keyring 2.1.2
88
+
89
+ MIT License
90
+
91
+ Copyright (c) 2020 N-API for Rust
92
+
93
+ Permission is hereby granted, free of charge, to any person obtaining a copy
94
+ of this software and associated documentation files (the "Software"), to deal
95
+ in the Software without restriction, including without limitation the rights
96
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
97
+ copies of the Software, and to permit persons to whom the Software is
98
+ furnished to do so, subject to the following conditions:
99
+
100
+ The above copyright notice and this permission notice shall be included in all
101
+ copies or substantial portions of the Software.
102
+
103
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
104
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
105
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
106
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
107
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
108
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
109
+ SOFTWARE.
110
+
111
+ Platform binaries are npm dependencies; their bundled Rust dependency notices are included in each platform package's LICENSE.third-party.md. The Linux binary includes libdbus under AFL-2.1 OR GPL-2.0-or-later, with full license texts preserved in that dependency.
112
+
113
+ ## ignore 7.0.12 — MIT
114
+
115
+ https://www.npmjs.com/package/ignore/v/7.0.12
116
+
117
+ Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
118
+ http://kael.me/
119
+
120
+ Permission is hereby granted, free of charge, to any person obtaining
121
+ a copy of this software and associated documentation files (the
122
+ "Software"), to deal in the Software without restriction, including
123
+ without limitation the rights to use, copy, modify, merge, publish,
124
+ distribute, sublicense, and/or sell copies of the Software, and to
125
+ permit persons to whom the Software is furnished to do so, subject to
126
+ the following conditions:
127
+
128
+ The above copyright notice and this permission notice shall be
129
+ included in all copies or substantial portions of the Software.
130
+
131
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
132
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
133
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
134
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
135
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
136
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
137
137
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/bin/joripspace.js CHANGED
@@ -10,6 +10,7 @@ const readline = require('node:readline/promises');
10
10
  const { formatDeploymentFailure } = require('../lib/deployment-error');
11
11
  const {
12
12
  printHelp,
13
+ printReportHelp,
13
14
  printDeployHelp,
14
15
  printDeployTemplateHelp,
15
16
  printInstallTemplateHelp,
@@ -151,6 +152,11 @@ async function main() {
151
152
  return;
152
153
  }
153
154
 
155
+ if (command === 'report' && (flags.help || flags.h)) {
156
+ printReportHelp();
157
+ return;
158
+ }
159
+
154
160
  if (
155
161
  (flags.help || flags.h) &&
156
162
  command !== 'deploy' &&
@@ -212,6 +218,23 @@ async function main() {
212
218
  printDeployHelp();
213
219
  return;
214
220
  }
221
+ if (flags.prepare) {
222
+ const project = requireProjectId(flags);
223
+ const details = await apiRequest(flags, `/v1/projects/${encodeURIComponent(project)}`, {
224
+ method: 'GET',
225
+ ...projectAuth(flags),
226
+ });
227
+ if (details?.deployment?.mode === 'github_actions') {
228
+ throw new Error('GitHub deployment is connected: use its configured workflow and trigger');
229
+ }
230
+ const result = require('../lib/deploy-prepare').prepareDeployment(
231
+ projectWorkspaceDir(flags),
232
+ flags,
233
+ writeTextAtomically
234
+ );
235
+ output(flags, result, (value) => console.log(value.next_action));
236
+ return;
237
+ }
215
238
  await deployCode(flags);
216
239
  return;
217
240
  case 'templates':
@@ -283,7 +306,9 @@ async function main() {
283
306
  await getUsageBreakdown(flags);
284
307
  return;
285
308
  case 'tokens':
286
- webOnlyCommand(message('API token administration', 'API 토큰 관리'));
309
+ if (rest[0] === 'revoke') await revokeToken(flags);
310
+ else if (rest[0] === 'current') await listTokens(flags);
311
+ else throw new Error('Use tokens current or tokens revoke --current|--token-id ID');
287
312
  return;
288
313
  case 'crons':
289
314
  await remoteCommands.listCrons(flags);
@@ -569,8 +594,8 @@ async function getProject(flags) {
569
594
  async function reportAgentIssue(flags) {
570
595
  const project = requireProjectId(flags);
571
596
  const category = (stringFlag(flags, 'category') || 'problem').trim().toLowerCase();
572
- if (category !== 'problem' && category !== 'bug') {
573
- throw new Error('report --category must be problem or bug');
597
+ if (category !== 'problem' && category !== 'bug' && category !== 'feedback') {
598
+ throw new Error('report --category must be problem, bug, or feedback');
574
599
  }
575
600
  const summary = (stringFlag(flags, 'summary') || stringFlag(flags, 'message')).trim();
576
601
  if (!summary) throw new Error('report requires --summary');
@@ -1095,12 +1120,8 @@ function printWebhookDelivery(delivery) {
1095
1120
  }
1096
1121
 
1097
1122
  async function listTokens(flags) {
1098
- throw new Error(
1099
- message(
1100
- 'Issue or disable API tokens in your web profile. CLI tokens are for project management.',
1101
- 'API 토큰은 웹 프로필에서 발급하거나 사용 중지해주세요. CLI 토큰은 프로젝트 관리 전용입니다.'
1102
- )
1103
- );
1123
+ const result = await apiRequest(flags, '/v1/me/tokens/current', { method: 'GET', ...projectAuth(flags) });
1124
+ output(flags, result, (value) => console.log(value.token_id));
1104
1125
  }
1105
1126
 
1106
1127
  async function createToken(flags) {
@@ -1113,12 +1134,13 @@ async function createToken(flags) {
1113
1134
  }
1114
1135
 
1115
1136
  async function revokeToken(flags) {
1116
- throw new Error(
1117
- message(
1118
- 'Disable API tokens in your web profile. A CLI token cannot revoke tokens.',
1119
- 'API 토큰은 웹 프로필에서 사용 중지해주세요. CLI 토큰으로 토큰을 폐기할 수 없습니다.'
1120
- )
1121
- );
1137
+ const tokenId = stringFlag(flags, 'token-id');
1138
+ if (Boolean(flags.current) === Boolean(tokenId)) throw new Error('Specify exactly one of --current or --token-id ID');
1139
+ const target = flags.current ? 'current' : tokenId;
1140
+ const result = await apiRequest(flags, `/v1/me/tokens/${encodeURIComponent(target)}`, {
1141
+ method: 'DELETE', ...projectAuth(flags),
1142
+ });
1143
+ output(flags, result, (value) => console.log(`${value.token_id}: ${value.status}`));
1122
1144
  }
1123
1145
 
1124
1146
  async function deleteProject(flags) {
@@ -0,0 +1,48 @@
1
+ const fs = require('node:fs');
2
+ const path = require('node:path');
3
+ const { resolveProjectFileTarget } = require('./project-paths');
4
+ const { buildDeployPayload } = require('./deploy-files');
5
+
6
+ // Preparation validates the actual build output, but never uploads or deploys it.
7
+ function prepareDeployment(workspace, flags, writeTextAtomically) {
8
+ const dir = String(flags.dir || '');
9
+ const entrypoint = String(flags.entrypoint || '');
10
+ for (const value of [dir, entrypoint]) {
11
+ if (!value || !/^[a-zA-Z0-9_./ -]+$/.test(value) || value.startsWith('-')) {
12
+ throw new Error(
13
+ 'deploy --prepare requires project-relative --dir and --entrypoint (letters, digits, spaces, _, -, ., /)'
14
+ );
15
+ }
16
+ }
17
+ const outputLocation = resolveProjectFileTarget(workspace, `${dir}/${entrypoint}`);
18
+ if (outputLocation.blockers.length || !fs.existsSync(outputLocation.target)) {
19
+ throw new Error('Build the project first: the configured Worker entrypoint does not exist');
20
+ }
21
+ try {
22
+ buildDeployPayload({ ...flags, cwd: workspace, dir: path.resolve(workspace, dir), entrypoint });
23
+ } catch (error) {
24
+ if (error.code !== 'archive_required') throw error;
25
+ }
26
+ const location = resolveProjectFileTarget(workspace, 'package.json');
27
+ if (location.blockers.length) throw new Error('package.json path is blocked');
28
+ const pkg = JSON.parse(fs.readFileSync(location.target, 'utf8'));
29
+ if (pkg.scripts != null && (typeof pkg.scripts !== 'object' || Array.isArray(pkg.scripts))) {
30
+ throw new Error('package.json scripts must be an object');
31
+ }
32
+ const scripts = pkg.scripts || {};
33
+ const command = `${typeof scripts.build === 'string' ? 'npm run build && ' : ''}npx --yes @joripspace/cli@latest deploy --cwd . --dir "${dir}" --entrypoint "${entrypoint}"`;
34
+ if (scripts['joripspace:deploy'] && scripts['joripspace:deploy'] !== command) {
35
+ throw new Error('Existing joripspace:deploy script was preserved; review it before preparing deployment');
36
+ }
37
+ pkg.scripts = { ...scripts, 'joripspace:deploy': command };
38
+ writeTextAtomically(location.target, `${JSON.stringify(pkg, null, 2)}\n`);
39
+ return {
40
+ status: 'prepared',
41
+ script: 'joripspace:deploy',
42
+ command,
43
+ next_action: 'npm run joripspace:deploy -- --label "배포 변경 내용"',
44
+ deployed: false,
45
+ };
46
+ }
47
+
48
+ module.exports = { prepareDeployment };
@@ -1,14 +1,14 @@
1
- 'use strict';
2
-
3
- function formatDeploymentFailure(message, details) {
4
- if (!details || typeof details !== 'object' || !details.deployment_id) return message;
5
- const lines = [message, `Deployment: ${details.deployment_id}`];
6
- if (details.error_stage) lines.push(`Stage: ${details.error_stage}`);
7
- if (details.error_code) lines.push(`Error code: ${details.error_code}`);
8
- if (details.error_details && details.error_details !== message) {
9
- lines.push(`Details: ${details.error_details}`);
10
- }
11
- return lines.join('\n');
12
- }
13
-
14
- module.exports = { formatDeploymentFailure };
1
+ 'use strict';
2
+
3
+ function formatDeploymentFailure(message, details) {
4
+ if (!details || typeof details !== 'object' || !details.deployment_id) return message;
5
+ const lines = [message, `Deployment: ${details.deployment_id}`];
6
+ if (details.error_stage) lines.push(`Stage: ${details.error_stage}`);
7
+ if (details.error_code) lines.push(`Error code: ${details.error_code}`);
8
+ if (details.error_details && details.error_details !== message) {
9
+ lines.push(`Details: ${details.error_details}`);
10
+ }
11
+ return lines.join('\n');
12
+ }
13
+
14
+ module.exports = { formatDeploymentFailure };
package/lib/help.js CHANGED
@@ -22,6 +22,9 @@ Usage:
22
22
  joripspace realtime-v2 activate --project PROJECT
23
23
  joripspace realtime-v2 rotate --project PROJECT
24
24
  joripspace realtime-v2 keys --project PROJECT --cursor CURSOR
25
+ joripspace tokens current
26
+ joripspace tokens revoke --current
27
+ joripspace tokens revoke --token-id TOKEN_ID
25
28
  joripspace realtime-v2 revoke-key --project PROJECT --kid KEY_ID
26
29
  joripspace db schema --project PROJECT --token TOKEN
27
30
  joripspace db query --project PROJECT --token TOKEN --sql "SELECT name FROM sqlite_schema WHERE type = 'table'"
@@ -38,7 +41,7 @@ Usage:
38
41
  joripspace install-template --project PROJECT --token TOKEN --template TEMPLATE --dir . --files-only
39
42
  joripspace template pull --project PROJECT --token TOKEN --dir . [--yes]
40
43
  joripspace get --project PROJECT --token TOKEN
41
- joripspace report --project PROJECT --category bug --summary "ISSUE_SUMMARY" [--details TEXT] [--expected TEXT] [--actual TEXT] [--error-code CODE]
44
+ joripspace report --project PROJECT --category problem|bug|feedback --summary "REPORT_SUMMARY" [--details TEXT] [--expected TEXT] [--actual TEXT] [--error-code CODE]
42
45
  joripspace deployments --project PROJECT --token TOKEN [--include-failure-details] [--json]
43
46
  joripspace deployment get --project PROJECT --deployment DEPLOYMENT_ID --json
44
47
  joripspace deployment pull --project PROJECT --deployment DEPLOYMENT_ID --cwd PATH [--force]
@@ -113,7 +116,10 @@ Security:
113
116
  Manage custom domains with the domain command.
114
117
  Use secret set or secret update --name NAME --value-stdin for Secret registration/replacement.
115
118
  Secret values are never returned. Secret deletion remains in the project web Secret page.
116
- Manage members, billing, API tokens, webhooks, and project deletion in the web UI.
119
+ Manage members, billing, token issuance, webhooks, and project deletion in the web UI.
120
+ tokens current returns the current token ID without its secret.
121
+ tokens revoke disables a token server-side within your account. --current ends this connection;
122
+ use a new connection code to reconnect. logout only removes local credentials.
117
123
 
118
124
  ${message('Language', '언어')}:
119
125
  ${message('Messages follow the OS default locale: Korean or English. Unsupported locales use English.', '안내는 OS 기본 로캘에 따라 한국어 또는 영어로 표시합니다. 미지원 로캘은 영어를 사용합니다.')}
@@ -127,6 +133,36 @@ Global flags:
127
133
  `);
128
134
  }
129
135
 
136
+ function printReportHelp() {
137
+ console.log(`JoripSpace report
138
+
139
+ Submit a project-related problem, bug, or improvement suggestion to JoripSpace.
140
+
141
+ Usage:
142
+ joripspace report --project PROJECT --category problem|bug|feedback --summary "SUMMARY"
143
+
144
+ Options:
145
+ --project PROJECT Existing project name; defaults to the current linked project.
146
+ --category TYPE problem (default), bug, or feedback (suggestions and improvements).
147
+ --summary TEXT Required summary, up to 160 characters. --message is an alias.
148
+ --details TEXT Context or reproduction steps, up to 8000 characters.
149
+ --expected TEXT Expected behavior or desired improvement, up to 4000 characters.
150
+ --actual TEXT Current behavior, up to 4000 characters.
151
+ --error-code CODE Optional error code, up to 120 characters.
152
+ --cwd PATH Resolve the project and saved login from this folder.
153
+ --json Return structured success or failure without prompting.
154
+
155
+ Examples:
156
+ joripspace report --category bug --summary "Deployment status is incorrect"
157
+ joripspace report --category feedback --summary "Add filtering to deployment history"
158
+
159
+ The command sends a report; it does not just save a local draft.
160
+ Use an existing login. Never include credentials, personal data, or private source.
161
+ CLI version, Node.js version and OS are attached automatically.
162
+ A successful response includes report_id. Do not blindly retry an uncertain submission.
163
+ `);
164
+ }
165
+
130
166
  function printDeployHelp() {
131
167
  console.log(`JoripSpace deploy
132
168
 
@@ -135,10 +171,16 @@ Usage:
135
171
 
136
172
  Options:
137
173
  --source PATH Deploy one source file. Entrypoint defaults to the file basename.
174
+ --prepare Validate built output and save a portable joripspace:deploy npm script; no deployment.
138
175
  --dir PATH Deploy every safe file under a directory. Authentication is resolved from --cwd.
139
176
  --file NAME=PATH Add one file mapping. Can be repeated.
140
177
  --entrypoint NAME Server module entrypoint.
141
178
  --label TEXT Required deployment label, up to 120 characters.
179
+
180
+ Prepare once after building (direct deployment only):
181
+ joripspace deploy --prepare --dir dist --entrypoint worker.js --json
182
+ Then, when deployment is requested:
183
+ npm run joripspace:deploy -- --label "Describe the change"
142
184
  `);
143
185
  }
144
186
 
@@ -177,4 +219,4 @@ Template updates:
177
219
  `);
178
220
  }
179
221
 
180
- module.exports = { printHelp, printDeployHelp, printDeployTemplateHelp, printInstallTemplateHelp };
222
+ module.exports = { printHelp, printReportHelp, printDeployHelp, printDeployTemplateHelp, printInstallTemplateHelp };