nworks 0.2.1 → 0.2.2
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.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
|
+
import { createRequire } from "module";
|
|
9
10
|
import { Command as Command8 } from "commander";
|
|
10
11
|
|
|
11
12
|
// src/commands/login.ts
|
|
@@ -2401,10 +2402,10 @@ var nanoid = /^[a-zA-Z0-9_-]{21}$/;
|
|
|
2401
2402
|
var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
|
|
2402
2403
|
var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
|
|
2403
2404
|
var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
2404
|
-
var uuid = (
|
|
2405
|
-
if (!
|
|
2405
|
+
var uuid = (version3) => {
|
|
2406
|
+
if (!version3)
|
|
2406
2407
|
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
|
|
2407
|
-
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${
|
|
2408
|
+
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
2408
2409
|
};
|
|
2409
2410
|
var uuid4 = /* @__PURE__ */ uuid(4);
|
|
2410
2411
|
var uuid6 = /* @__PURE__ */ uuid(6);
|
|
@@ -14560,10 +14561,10 @@ function fromJSONSchema(schema, params) {
|
|
|
14560
14561
|
if (typeof schema === "boolean") {
|
|
14561
14562
|
return schema ? z.any() : z.never();
|
|
14562
14563
|
}
|
|
14563
|
-
const
|
|
14564
|
+
const version3 = detectVersion(schema, params?.defaultTarget);
|
|
14564
14565
|
const defs = schema.$defs || schema.definitions || {};
|
|
14565
14566
|
const ctx = {
|
|
14566
|
-
version:
|
|
14567
|
+
version: version3,
|
|
14567
14568
|
defs,
|
|
14568
14569
|
refs: /* @__PURE__ */ new Map(),
|
|
14569
14570
|
processing: /* @__PURE__ */ new Set(),
|
|
@@ -14765,7 +14766,9 @@ var mcpCommand = new Command7("mcp").description("Start MCP server (stdio transp
|
|
|
14765
14766
|
});
|
|
14766
14767
|
|
|
14767
14768
|
// src/index.ts
|
|
14768
|
-
var
|
|
14769
|
+
var require2 = createRequire(import.meta.url);
|
|
14770
|
+
var { version: version2 } = require2("../package.json");
|
|
14771
|
+
var program = new Command8().name("nworks").description("NAVER WORKS CLI \u2014 built for humans and AI agents").version(version2).option("--json", "Always output JSON").option("-v, --verbose", "Debug logging").option("--dry-run", "Print request without calling API").option("-p, --profile <name>", "Profile name", "default");
|
|
14769
14772
|
program.addCommand(loginCommand);
|
|
14770
14773
|
program.addCommand(logoutCommand);
|
|
14771
14774
|
program.addCommand(whoamiCommand);
|