@devkong/cli 0.0.67-alpha.20 → 0.0.67-alpha.22
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,28 +1,28 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
|
|
3
|
-
set EXTENSION_DIR=%1
|
|
4
|
-
echo %EXTENSION_DIR%
|
|
5
|
-
|
|
6
|
-
where python >nul 2>&1
|
|
7
|
-
if %errorlevel% equ 0 (
|
|
8
|
-
set PYTHON_CMD=python
|
|
9
|
-
) else (
|
|
10
|
-
set PYTHON_CMD=python3
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
cd %EXTENSION_DIR%
|
|
14
|
-
|
|
15
|
-
REM Recreate the venv from scratch so a stale interpreter path (e.g. left over
|
|
16
|
-
REM after a Python upgrade or a moved/copied project) can't leave pip pointing
|
|
17
|
-
REM at a missing binary.
|
|
18
|
-
%PYTHON_CMD% -m venv --clear .venv
|
|
19
|
-
if errorlevel 1 exit /b 1
|
|
20
|
-
|
|
21
|
-
call .venv\Scripts\activate.bat
|
|
22
|
-
|
|
23
|
-
REM Invoke pip via `python -m pip` rather than the pip/pip3 wrapper so we don't
|
|
24
|
-
REM depend on the wrapper script's (possibly stale) shebang.
|
|
25
|
-
python -m pip freeze > requirements-lock.txt
|
|
26
|
-
python -m pip install --default-timeout=120 -r requirements.txt -r requirements-dev.txt
|
|
27
|
-
if errorlevel 1 exit /b 1
|
|
28
|
-
python -m pip freeze > requirements-lock.txt
|
|
1
|
+
@echo off
|
|
2
|
+
|
|
3
|
+
set EXTENSION_DIR=%1
|
|
4
|
+
echo %EXTENSION_DIR%
|
|
5
|
+
|
|
6
|
+
where python >nul 2>&1
|
|
7
|
+
if %errorlevel% equ 0 (
|
|
8
|
+
set PYTHON_CMD=python
|
|
9
|
+
) else (
|
|
10
|
+
set PYTHON_CMD=python3
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
cd %EXTENSION_DIR%
|
|
14
|
+
|
|
15
|
+
REM Recreate the venv from scratch so a stale interpreter path (e.g. left over
|
|
16
|
+
REM after a Python upgrade or a moved/copied project) can't leave pip pointing
|
|
17
|
+
REM at a missing binary.
|
|
18
|
+
%PYTHON_CMD% -m venv --clear .venv
|
|
19
|
+
if errorlevel 1 exit /b 1
|
|
20
|
+
|
|
21
|
+
call .venv\Scripts\activate.bat
|
|
22
|
+
|
|
23
|
+
REM Invoke pip via `python -m pip` rather than the pip/pip3 wrapper so we don't
|
|
24
|
+
REM depend on the wrapper script's (possibly stale) shebang.
|
|
25
|
+
python -m pip freeze > requirements-lock.txt
|
|
26
|
+
python -m pip install --default-timeout=120 -r requirements.txt -r requirements-dev.txt
|
|
27
|
+
if errorlevel 1 exit /b 1
|
|
28
|
+
python -m pip freeze > requirements-lock.txt
|
package/index.js
CHANGED
|
@@ -60771,25 +60771,25 @@ async function spawnCommandWithArgs(command, commandArgs, logger = null, shell =
|
|
|
60771
60771
|
});
|
|
60772
60772
|
});
|
|
60773
60773
|
}
|
|
60774
|
-
function printError(
|
|
60774
|
+
function printError(label, error) {
|
|
60775
60775
|
if (axios_default.isAxiosError(error)) {
|
|
60776
|
-
console.error(
|
|
60777
|
-
console.error("
|
|
60778
|
-
console.error("
|
|
60779
|
-
console.error("
|
|
60780
|
-
console.error("Request Data:", error.config?.data);
|
|
60776
|
+
console.error("url:", error.config?.url);
|
|
60777
|
+
console.error("method:", error.config?.method);
|
|
60778
|
+
console.error("headers:", error.config?.headers);
|
|
60779
|
+
console.error("request data:", error.config?.data);
|
|
60781
60780
|
if (error.response) {
|
|
60782
|
-
console.error("
|
|
60783
|
-
console.error("
|
|
60784
|
-
console.error("
|
|
60781
|
+
console.error("response status:", error.response.status);
|
|
60782
|
+
console.error("response headers:", error.response.headers);
|
|
60783
|
+
console.error("response data:", error.response.data);
|
|
60785
60784
|
} else if (error.request) {
|
|
60786
|
-
console.error("
|
|
60787
|
-
console.error("
|
|
60785
|
+
console.error("request was made but no response received");
|
|
60786
|
+
console.error("request data:", error.request);
|
|
60788
60787
|
}
|
|
60788
|
+
console.error(label + ":", error.message);
|
|
60789
60789
|
} else if (error instanceof AppError) {
|
|
60790
|
-
console.error(
|
|
60790
|
+
console.error(label + ":", error.message);
|
|
60791
60791
|
} else {
|
|
60792
|
-
console.error(
|
|
60792
|
+
console.error(label + ":", error);
|
|
60793
60793
|
}
|
|
60794
60794
|
}
|
|
60795
60795
|
function escapePathSpaces(sourcePath) {
|
package/package.json
CHANGED
|
@@ -12,5 +12,5 @@ export declare function resolveProjectPath(fileName: string): string;
|
|
|
12
12
|
export declare function generateShortId(): ShortUUID;
|
|
13
13
|
export declare function spawnCommand(commandText: string, logger?: ILogger | null, shell?: boolean): Promise<string>;
|
|
14
14
|
export declare function spawnCommandWithArgs(command: string, commandArgs: string[], logger?: ILogger | null, shell?: boolean): Promise<string>;
|
|
15
|
-
export declare function printError(
|
|
15
|
+
export declare function printError(label: string, error: unknown): void;
|
|
16
16
|
export declare function escapePathSpaces(sourcePath: string): string;
|
|
@@ -20,7 +20,7 @@ export { applyJqFilterReplacements, applyJqObjectReplacements, applyJqTextReplac
|
|
|
20
20
|
export type { JqArray, JqFilter, JqObject, JqSerializer, JqText, RefactorReplacement, } from "./lib/jq";
|
|
21
21
|
export { generateFakeJsonObject, jsonToHumanReadable, prettyJsonObject, prettyJsonText, safeJsonParse, } from "./lib/json";
|
|
22
22
|
export type { JsonArray, JsonObject, JsonSchemaUrl, JsonText } from "./lib/json";
|
|
23
|
-
export { buildExampleObject, buildJSONSchemaType, createEmptyJsonSchema, getNestedValue, getPropertyType, hasJSONSchemaType, isRequired, updateNestedValue, } from "./lib/jsonSchema";
|
|
23
|
+
export { buildExampleObject, buildJSONSchemaType, createEmptyJsonSchema, getNestedValue, getPropertyType, hasJSONSchemaType, isRequired, normalizeNullableUnions, updateNestedValue, } from "./lib/jsonSchema";
|
|
24
24
|
export { KeyGenerator } from "./lib/keyGenerator";
|
|
25
25
|
export { findLastIndex, insertItem, moveItem, unique } from "./lib/list";
|
|
26
26
|
export { deepMerge, deepMergeAll } from "./lib/merge";
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { JSONSchema7, JSONSchema7TypeName } from "json-schema";
|
|
2
2
|
import { JsonObject, Optional } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Collapses Pydantic's optional idiom `anyOf: [X, { "type": "null" }]` (and the `oneOf` form) down
|
|
5
|
+
* to `X`, recursively, and drops the now-dead `$defs`/`definitions`.
|
|
6
|
+
*
|
|
7
|
+
* Pydantic encodes every optional/nullable field as such a union instead of a nullable type, and
|
|
8
|
+
* `$ref` dereferencing inlines the branch but leaves the union in place. A form that reads
|
|
9
|
+
* `properties`/`type` straight off the node then sees an `anyOf` wrapper with no `properties` and
|
|
10
|
+
* renders nothing. When a single non-null branch remains it is merged with the union's sibling
|
|
11
|
+
* keywords (`default`, `description`, `title`, ...); genuine multi-branch unions keep their non-null
|
|
12
|
+
* branches. Run this right after dereferencing, before the schema reaches the form.
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizeNullableUnions<T = JSONSchema7>(schema: T): T;
|
|
3
15
|
export declare function hasJSONSchemaType(type: JSONSchema7["type"], name: JSONSchema7TypeName): boolean;
|
|
4
16
|
export declare function getPropertyType(schema: Optional<JSONSchema7> | null): string;
|
|
5
17
|
export declare function isRequired(schema: Optional<JSONSchema7> | null, propertyKey: string): boolean;
|