@share-crm/sharedev-cli 0.0.4-rc.49-test.0 → 0.0.4-rc.49-test.1
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/sharedev.js +26 -19
- package/package.json +1 -1
package/dist/sharedev.js
CHANGED
|
@@ -19998,13 +19998,17 @@ const logger_ts_1 = __webpack_require__(63333);
|
|
|
19998
19998
|
const apl_execution_log_ts_1 = __webpack_require__(79843);
|
|
19999
19999
|
/**
|
|
20000
20000
|
* 解析数值参数:支持毫秒时间戳或 ISO 日期字符串(如 2026-10-19 / 2026-10-19T10:00:00)
|
|
20001
|
+
* date-only 写法补 T00:00:00 走本地时区零点:直接 Date.parse('2026-10-19') 会按 UTC 零点解析,
|
|
20002
|
+
* 与 date-time 写法(本地解析)相差时区偏移,两种写法语义需一致
|
|
20001
20003
|
*/
|
|
20002
20004
|
function parseTimestampOrNumber(value, optionName) {
|
|
20003
20005
|
const numeric = Number(value);
|
|
20004
20006
|
if (Number.isFinite(numeric) && value.trim() !== '') {
|
|
20005
20007
|
return numeric;
|
|
20006
20008
|
}
|
|
20007
|
-
const
|
|
20009
|
+
const trimmed = value.trim();
|
|
20010
|
+
const normalized = /^\d{4}-\d{2}-\d{2}$/.test(trimmed) ? `${trimmed}T00:00:00` : value;
|
|
20011
|
+
const parsed = Date.parse(normalized);
|
|
20008
20012
|
if (Number.isFinite(parsed)) {
|
|
20009
20013
|
return parsed;
|
|
20010
20014
|
}
|
|
@@ -20042,7 +20046,7 @@ async function aplLogsNewCommand(apiName, _context, options = {}) {
|
|
|
20042
20046
|
// 位置参数缺省时传空字符串 = 查询全部函数的日志(服务端必填项用空值放行全量)
|
|
20043
20047
|
functionApiName: apiName?.trim() ?? '',
|
|
20044
20048
|
pageSize: options.pageSize ? Number(options.pageSize) : 20,
|
|
20045
|
-
nextPage: parseBooleanOption(options.nextPage
|
|
20049
|
+
nextPage: parseBooleanOption(options.nextPage, '--nextPage') ?? false
|
|
20046
20050
|
};
|
|
20047
20051
|
if (!Number.isInteger(filters.pageSize) || filters.pageSize <= 0) {
|
|
20048
20052
|
throw new Error('Invalid --pageSize: only a positive integer is supported.');
|
|
@@ -20076,11 +20080,12 @@ async function aplLogsNewCommand(apiName, _context, options = {}) {
|
|
|
20076
20080
|
logger_ts_1.loggerService.success('No execution logs found.');
|
|
20077
20081
|
return;
|
|
20078
20082
|
}
|
|
20079
|
-
//
|
|
20083
|
+
// 行字段为 112 环境真实日志实证:主键字段名为 id(get-execution-log 的 logId 入参取该值)
|
|
20080
20084
|
const rows = logs.map((item) => [
|
|
20081
|
-
String(item.
|
|
20085
|
+
String(item.id ?? '-'),
|
|
20082
20086
|
formatLogTimestamp(item.operationTime),
|
|
20083
|
-
|
|
20087
|
+
// Function 列用 || 兜底:全量查询时 filters.functionApiName 为空串,?? 不会拦截空串
|
|
20088
|
+
String(item.functionApiName || filters.functionApiName || '-'),
|
|
20084
20089
|
String(item.traceId ?? '-'),
|
|
20085
20090
|
item.success == null ? '-' : item.success ? 'success' : 'failed',
|
|
20086
20091
|
String(item.name ?? '-')
|
|
@@ -20088,7 +20093,7 @@ async function aplLogsNewCommand(apiName, _context, options = {}) {
|
|
|
20088
20093
|
logger_ts_1.loggerService.printTable(['Log ID', 'Operation Time', 'Function', 'Trace ID', 'Result', 'Trigger Name'], rows);
|
|
20089
20094
|
logger_ts_1.loggerService.info(`Fetched ${logs.length} log(s).`);
|
|
20090
20095
|
if (hasMore) {
|
|
20091
|
-
const lastLogId = String(logs[logs.length - 1]?.
|
|
20096
|
+
const lastLogId = String(logs[logs.length - 1]?.id ?? '');
|
|
20092
20097
|
logger_ts_1.loggerService.info(`More logs available. Fetch the next page with --logId ${lastLogId} --nextPage true`);
|
|
20093
20098
|
}
|
|
20094
20099
|
}
|
|
@@ -45192,21 +45197,20 @@ function resolvePwcTarget(commandName, apiname, pathValue, type, context) {
|
|
|
45192
45197
|
/***/ },
|
|
45193
45198
|
|
|
45194
45199
|
/***/ 77363
|
|
45195
|
-
(__unused_webpack_module,
|
|
45200
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
45196
45201
|
|
|
45197
|
-
__webpack_require__.r(__webpack_exports__);
|
|
45198
45202
|
|
|
45199
45203
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45200
45204
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45201
45205
|
};
|
|
45202
|
-
Object.defineProperty(
|
|
45203
|
-
|
|
45204
|
-
|
|
45205
|
-
|
|
45206
|
-
|
|
45207
|
-
|
|
45208
|
-
|
|
45209
|
-
|
|
45206
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
45207
|
+
exports.pwcPullCommand = pwcPullCommand;
|
|
45208
|
+
exports.pwcCreateCommand = pwcCreateCommand;
|
|
45209
|
+
exports.pwcDeployCommand = pwcDeployCommand;
|
|
45210
|
+
exports.pwcPushCommand = pwcPushCommand;
|
|
45211
|
+
exports.pwcInfoCommand = pwcInfoCommand;
|
|
45212
|
+
exports.pwcDevCommand = pwcDevCommand;
|
|
45213
|
+
exports.pwcPlaceholderCommand = pwcPlaceholderCommand;
|
|
45210
45214
|
const node_path_1 = __importDefault(__webpack_require__(76760));
|
|
45211
45215
|
const node_module_1 = __webpack_require__(98995);
|
|
45212
45216
|
const prompts_1 = __webpack_require__(29848);
|
|
@@ -45650,7 +45654,10 @@ async function pwcDevCommand(filePath, context, options = {}) {
|
|
|
45650
45654
|
logger_ts_1.loggerService.info(shouldQueryAll
|
|
45651
45655
|
? `Starting Beefly dev server for ${outputNames.length} entr${outputNames.length === 1 ? 'y' : 'ies'}`
|
|
45652
45656
|
: `Starting Beefly dev server with ${normalizedFilePath}`);
|
|
45653
|
-
|
|
45657
|
+
// createRequire(import.meta.url) 会被 webpack 静态求值为构建机的绝对源码路径,发布后失效;
|
|
45658
|
+
// 改用运行时入口路径(bin/cli.mjs / dist/sharedev.js,即 process.argv[1])做解析基准,
|
|
45659
|
+
// 从 CLI 自身安装位置向上命中包内 node_modules 的 @share-crm/beefly。
|
|
45660
|
+
const require = (0, node_module_1.createRequire)(process.argv[1] ?? process.cwd());
|
|
45654
45661
|
const beefly = require('@share-crm/beefly');
|
|
45655
45662
|
// 复用 Beefly 官方 API 启动 webpack dev server,入口名称决定预览产物名称。
|
|
45656
45663
|
const server = await beefly.cli.dev({
|
|
@@ -50498,8 +50505,8 @@ async function readCliPackageMeta() {
|
|
|
50498
50505
|
? "@share-crm/sharedev-cli".trim()
|
|
50499
50506
|
: '@share-crm/sharedev-cli';
|
|
50500
50507
|
const debugEnabled = true && Boolean(false);
|
|
50501
|
-
const rawVersion = ( true && "0.0.4-rc.49
|
|
50502
|
-
? "0.0.4-rc.49
|
|
50508
|
+
const rawVersion = ( true && "0.0.4-rc.49".trim())
|
|
50509
|
+
? "0.0.4-rc.49".trim()
|
|
50503
50510
|
: '0.0.0';
|
|
50504
50511
|
const version = rawVersion + (debugEnabled ? '-debug' : '');
|
|
50505
50512
|
return { name, version };
|