speed 1.2.3 → 1.3.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/README.md +48 -1
- package/dist/circuit-breaker/index.d.ts +1 -0
- package/dist/circuit-breaker/index.js +2 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +2 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +2 -0
- package/dist/gateway/index.d.ts +1 -0
- package/dist/gateway/index.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +22 -0
- package/dist/loadbalancer/index.d.ts +1 -0
- package/dist/loadbalancer/index.js +2 -0
- package/dist/messaging/index.d.ts +1 -0
- package/dist/messaging/index.js +2 -0
- package/dist/observability/index.d.ts +1 -0
- package/dist/observability/index.js +2 -0
- package/dist/registry/index.d.ts +2 -0
- package/dist/registry/index.js +6 -0
- package/dist/registry/registry.d.ts +14 -0
- package/dist/registry/registry.js +73 -0
- package/dist/rpc/index.d.ts +1 -0
- package/dist/rpc/index.js +2 -0
- package/dist/scaffold/command.d.ts +2 -0
- package/dist/scaffold/command.js +83 -0
- package/dist/scaffold/templates/.gitignore.tpl +4 -0
- package/dist/scaffold/templates/config.json.tpl +3 -0
- package/dist/scaffold/templates/main.ts.tpl +26 -0
- package/dist/scaffold/templates/package.json.tpl +19 -0
- package/dist/scaffold/templates/tsconfig.json.tpl +17 -0
- package/package.json +67 -9
- package/LICENSE +0 -21
- package/tsconfig.json +0 -22
package/README.md
CHANGED
|
@@ -1,2 +1,49 @@
|
|
|
1
1
|
# speed
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
一个 TypeScript **微服务编排框架**(对标 Spring Cloud),构建于 [typespeed](https://github.com/speedphp/typespeed) 之上。
|
|
4
|
+
|
|
5
|
+
> 关系:`typespeed`(单体框架 = SpringBoot)造应用,`speed`(微服务编排 = SpringCloud)管应用群。
|
|
6
|
+
|
|
7
|
+
## 快速开始(1.3.0)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install speed -g
|
|
11
|
+
speed new demo
|
|
12
|
+
cd demo
|
|
13
|
+
npm install
|
|
14
|
+
npm run start # 访问 http://127.0.0.1:8080/health
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`speed new` 生成的项目使用 **标准装饰器**(TC39,`experimentalDecorators: false`),入口骨架见 `src/main.ts`。
|
|
18
|
+
|
|
19
|
+
## 注册中心(1.3.1)
|
|
20
|
+
|
|
21
|
+
注册表是注册中心的「单点真相」,提供 `register` / `unregister` / `getInstances` 三个基础 API(纯内存,同 `host:port` 重复注册只更新不新增):
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { LocalRegistry } from "speed/registry";
|
|
25
|
+
|
|
26
|
+
const registry = new LocalRegistry();
|
|
27
|
+
registry.register("user-service", { host: "127.0.0.1", port: 8080 });
|
|
28
|
+
registry.register("user-service", { host: "127.0.0.1", port: 8081, metadata: { version: "v2" } });
|
|
29
|
+
|
|
30
|
+
registry.getInstances("user-service"); // 两个实例
|
|
31
|
+
registry.unregister("user-service", "127.0.0.1", 8080); // true
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
> 详见 `docs/1.3.1-本地注册表.md`(为什么 → 怎么用 → 原理 → 怎么扩展)。
|
|
35
|
+
|
|
36
|
+
## 模块(单包 `speed` + 子路径导出)
|
|
37
|
+
|
|
38
|
+
| 子路径 | 模块 | 版本 |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `speed/registry` | ① 注册中心 | 1.3.x |
|
|
41
|
+
| `speed/gateway` | ③ API 网关 | 1.4.x |
|
|
42
|
+
| `speed/config` | ② 配置中心 | 1.5.x |
|
|
43
|
+
| `speed/loadbalancer` | ⑤ 负载均衡 | 1.6.x |
|
|
44
|
+
| `speed/circuit-breaker` | ④ 熔断限流 | 1.7.x |
|
|
45
|
+
| `speed/rpc` | ⑥ RPC 客户端 | 1.8.x |
|
|
46
|
+
| `speed/messaging` | ⑧ 消息驱动 | 1.9.x |
|
|
47
|
+
| `speed/observability` | ⑦+⑨ 追踪可观测 | 1.10.x |
|
|
48
|
+
|
|
49
|
+
> 骨架阶段,开发中。开发计划见 speedphp 项目内的 `speed-微服务化开发计划.md` 及各模块计划文件。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// speed —— TypeScript 微服务编排框架(对标 Spring Cloud),构建于 typespeed 之上。
|
|
18
|
+
//
|
|
19
|
+
// 骨架阶段(1.3.x):speed 自身的微服务能力(@Service / @RpcClient / @GatewayRoute / @Config 等)
|
|
20
|
+
// 随模块开发逐步加入;项目入口引导暂由 typespeed 的 @app / ServerFactory 承担
|
|
21
|
+
// (脚手架模板 src/main.ts 直接从 "typespeed" 引入,保证 MAIN_PATH 正确解析到应用目录)。
|
|
22
|
+
__exportStar(require("./registry"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocalRegistry = void 0;
|
|
4
|
+
// ① 注册中心(服务注册 + 发现)—— 1.3.x 实现
|
|
5
|
+
var registry_1 = require("./registry");
|
|
6
|
+
Object.defineProperty(exports, "LocalRegistry", { enumerable: true, get: function () { return registry_1.LocalRegistry; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ServiceInstance {
|
|
2
|
+
host: string;
|
|
3
|
+
port: number;
|
|
4
|
+
registeredAt?: number;
|
|
5
|
+
metadata?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export declare class LocalRegistry {
|
|
8
|
+
private instances;
|
|
9
|
+
register(serviceName: string, instance: ServiceInstance): ServiceInstance;
|
|
10
|
+
unregister(serviceName: string, host: string, port: number): boolean;
|
|
11
|
+
getInstances(serviceName: string): ServiceInstance[];
|
|
12
|
+
getServiceNames(): string[];
|
|
13
|
+
getInstanceCount(serviceName: string): number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocalRegistry = void 0;
|
|
4
|
+
// 本地注册表:服务注册 + 发现的单点真相(纯内存,不涉及网络)。
|
|
5
|
+
// 数据结构为两级:服务名 -> 实例列表(实例列表用数组,实例带 metadata 扩展位)。
|
|
6
|
+
class LocalRegistry {
|
|
7
|
+
// 两级结构:服务名 -> 实例列表(实例列表用数组)
|
|
8
|
+
instances = new Map();
|
|
9
|
+
// 注册一个实例。同 host:port 重复注册只更新不新增。
|
|
10
|
+
register(serviceName, instance) {
|
|
11
|
+
// 去重键:host:port(同一服务内的实例唯一标识)
|
|
12
|
+
const key = `${instance.host}:${instance.port}`;
|
|
13
|
+
const list = this.instances.get(serviceName);
|
|
14
|
+
// 服务已存在时,在其列表里做线性查找(实例数量少,线性足够)
|
|
15
|
+
if (list) {
|
|
16
|
+
const existing = list.find((item) => `${item.host}:${item.port}` === key);
|
|
17
|
+
if (existing) {
|
|
18
|
+
// 原地刷新注册时间(心跳语义),并替换 metadata(若本次提供)
|
|
19
|
+
existing.registeredAt = Date.now();
|
|
20
|
+
if (instance.metadata !== undefined) {
|
|
21
|
+
existing.metadata = instance.metadata;
|
|
22
|
+
}
|
|
23
|
+
return existing;
|
|
24
|
+
}
|
|
25
|
+
// 新实例补全 registeredAt 后 push 进列表
|
|
26
|
+
const newInstance = {
|
|
27
|
+
...instance,
|
|
28
|
+
registeredAt: instance.registeredAt ?? Date.now(),
|
|
29
|
+
};
|
|
30
|
+
list.push(newInstance);
|
|
31
|
+
return newInstance;
|
|
32
|
+
}
|
|
33
|
+
// 服务不存在:新建列表并存入 map
|
|
34
|
+
const newInstance = {
|
|
35
|
+
...instance,
|
|
36
|
+
registeredAt: instance.registeredAt ?? Date.now(),
|
|
37
|
+
};
|
|
38
|
+
this.instances.set(serviceName, [newInstance]);
|
|
39
|
+
return newInstance;
|
|
40
|
+
}
|
|
41
|
+
// 注销。找到并移除同 host:port 的实例返回 true;否则返回 false。
|
|
42
|
+
unregister(serviceName, host, port) {
|
|
43
|
+
const list = this.instances.get(serviceName);
|
|
44
|
+
if (!list) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
const key = `${host}:${port}`;
|
|
48
|
+
const index = list.findIndex((item) => `${item.host}:${item.port}` === key);
|
|
49
|
+
if (index === -1) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
list.splice(index, 1);
|
|
53
|
+
// 移除后若该服务实例列表为空,把 serviceName 这个 key 从 map 删除
|
|
54
|
+
if (list.length === 0) {
|
|
55
|
+
this.instances.delete(serviceName);
|
|
56
|
+
}
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
// 返回该服务的实例列表(浅拷贝,防止外部改动内部状态);服务不存在返回 []
|
|
60
|
+
getInstances(serviceName) {
|
|
61
|
+
const list = this.instances.get(serviceName);
|
|
62
|
+
return list ? [...list] : [];
|
|
63
|
+
}
|
|
64
|
+
// 返回所有已注册的服务名
|
|
65
|
+
getServiceNames() {
|
|
66
|
+
return Array.from(this.instances.keys());
|
|
67
|
+
}
|
|
68
|
+
// 返回该服务下实例数量;服务不存在返回 0
|
|
69
|
+
getInstanceCount(serviceName) {
|
|
70
|
+
return this.instances.get(serviceName)?.length ?? 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.LocalRegistry = LocalRegistry;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const commander_1 = require("commander");
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const program = new commander_1.Command();
|
|
41
|
+
program
|
|
42
|
+
.name("speed")
|
|
43
|
+
.description("A microservices orchestration framework for TypeScript (the Spring Cloud equivalent, built on typespeed).")
|
|
44
|
+
.version("1.3.1");
|
|
45
|
+
program.command('new <projectName>')
|
|
46
|
+
.description('Create a new speed project.')
|
|
47
|
+
.action((projectName) => {
|
|
48
|
+
const currentDir = process.cwd();
|
|
49
|
+
const appPath = path.join(currentDir, projectName);
|
|
50
|
+
if (fs.existsSync(appPath)) {
|
|
51
|
+
console.error('');
|
|
52
|
+
console.error(` Error: directory "${projectName}" already exists.`);
|
|
53
|
+
console.error('');
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
fs.mkdirSync(appPath);
|
|
57
|
+
mkFile("package.json", appPath, projectName);
|
|
58
|
+
mkFile("tsconfig.json", appPath, projectName);
|
|
59
|
+
mkFile(".gitignore", appPath, projectName);
|
|
60
|
+
fs.mkdirSync(path.join(appPath, "src"));
|
|
61
|
+
mkFile("main.ts", path.join(appPath, "src"), projectName);
|
|
62
|
+
mkFile("config.json", path.join(appPath, "src"), projectName);
|
|
63
|
+
console.log('');
|
|
64
|
+
console.log(' Create speed project success!');
|
|
65
|
+
console.log('');
|
|
66
|
+
console.log(' Next steps:');
|
|
67
|
+
console.log(` cd ${projectName}`);
|
|
68
|
+
console.log(' npm install');
|
|
69
|
+
console.log(' npm run start');
|
|
70
|
+
console.log('');
|
|
71
|
+
});
|
|
72
|
+
program.on('--help', () => {
|
|
73
|
+
console.log('');
|
|
74
|
+
console.log(' Examples:');
|
|
75
|
+
console.log('');
|
|
76
|
+
console.log(' $ speed new demo');
|
|
77
|
+
});
|
|
78
|
+
program.parse(process.argv);
|
|
79
|
+
function mkFile(fileName, targetPath, projectName) {
|
|
80
|
+
const tplPath = path.join(__dirname, "templates");
|
|
81
|
+
const fileContents = fs.readFileSync(path.join(tplPath, fileName + ".tpl"), "utf-8");
|
|
82
|
+
fs.writeFileSync(path.join(targetPath, fileName), fileContents.replace(/###appName###/g, projectName));
|
|
83
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Symbol.metadata polyfill:Node 22/24/26 均无 Symbol.metadata,
|
|
2
|
+
// 标准装饰器的 context.metadata 依赖它,缺失会 TypeError,必须最先执行。
|
|
3
|
+
(Symbol as { metadata?: symbol }).metadata ??= Symbol("Symbol.metadata");
|
|
4
|
+
|
|
5
|
+
// 骨架阶段直接使用 typespeed 的 @app 引导(speed 的微服务装饰器 @Service 等自 1.3.2 起提供)。
|
|
6
|
+
import { app, autoware, ServerFactory } from "typespeed";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* speed 项目入口骨架(标准装饰器模式)。
|
|
10
|
+
*
|
|
11
|
+
* 目录约定:
|
|
12
|
+
* - 服务类放 src/(本文件即入口);
|
|
13
|
+
* - 配置文件 src/config.json(可选,typespeed 启动时自动读取,可用 config()/@value 访问);
|
|
14
|
+
* - tsconfig.json 已固定标准装饰器(experimentalDecorators:false + esnext.decorators lib)。
|
|
15
|
+
*/
|
|
16
|
+
@app
|
|
17
|
+
class Main {
|
|
18
|
+
|
|
19
|
+
@autoware(ServerFactory)
|
|
20
|
+
public server!: ServerFactory;
|
|
21
|
+
|
|
22
|
+
public main() {
|
|
23
|
+
this.server.start(8080);
|
|
24
|
+
console.log("speed service started at http://127.0.0.1:8080");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "###appName###",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A speed microservice project (built on typespeed).",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "ts-node --transpile-only src/main.ts",
|
|
7
|
+
"build": "tsc -p .",
|
|
8
|
+
"test": "ts-node --transpile-only src/main.ts"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"speed": "^1.3.0",
|
|
12
|
+
"typespeed": "^2.6.7"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"typescript": "^5.9.3",
|
|
16
|
+
"ts-node": "^10.9.2",
|
|
17
|
+
"@types/node": "^22.0.0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2022",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": false,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"useDefineForClassFields": true,
|
|
12
|
+
"experimentalDecorators": false,
|
|
13
|
+
"emitDecoratorMetadata": false,
|
|
14
|
+
"lib": ["es2022", "esnext.decorators"]
|
|
15
|
+
},
|
|
16
|
+
"include": ["src/**/*.ts"]
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "speed",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "1.3.1",
|
|
4
|
+
"description": "A microservices orchestration framework for TypeScript (the Spring Cloud equivalent, built on typespeed).",
|
|
5
5
|
"author": "speedphp",
|
|
6
|
-
"license": "MIT
|
|
7
|
-
"
|
|
8
|
-
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./registry": {
|
|
15
|
+
"types": "./dist/registry/index.d.ts",
|
|
16
|
+
"default": "./dist/registry/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./gateway": {
|
|
19
|
+
"types": "./dist/gateway/index.d.ts",
|
|
20
|
+
"default": "./dist/gateway/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./config": {
|
|
23
|
+
"types": "./dist/config/index.d.ts",
|
|
24
|
+
"default": "./dist/config/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./loadbalancer": {
|
|
27
|
+
"types": "./dist/loadbalancer/index.d.ts",
|
|
28
|
+
"default": "./dist/loadbalancer/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./circuit-breaker": {
|
|
31
|
+
"types": "./dist/circuit-breaker/index.d.ts",
|
|
32
|
+
"default": "./dist/circuit-breaker/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./rpc": {
|
|
35
|
+
"types": "./dist/rpc/index.d.ts",
|
|
36
|
+
"default": "./dist/rpc/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./messaging": {
|
|
39
|
+
"types": "./dist/messaging/index.d.ts",
|
|
40
|
+
"default": "./dist/messaging/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./observability": {
|
|
43
|
+
"types": "./dist/observability/index.d.ts",
|
|
44
|
+
"default": "./dist/observability/index.js"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"bin": {
|
|
48
|
+
"speed": "dist/scaffold/command.js"
|
|
49
|
+
},
|
|
50
|
+
"files": [
|
|
51
|
+
"dist"
|
|
52
|
+
],
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"typespeed": "^2.6.7",
|
|
55
|
+
"commander": "^9.5.0"
|
|
9
56
|
},
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"typescript": "^5.9.3",
|
|
59
|
+
"@types/node": "^22.0.0",
|
|
60
|
+
"mocha": "10.2.0",
|
|
61
|
+
"chai": "4.3.7",
|
|
62
|
+
"@types/mocha": "^10.0.1",
|
|
63
|
+
"@types/chai": "^4.3.11",
|
|
64
|
+
"ts-node": "^10.9.1"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "tsc -p .",
|
|
68
|
+
"prebuild": "rm -rf dist",
|
|
69
|
+
"postbuild": "cp -r src/scaffold/templates dist/scaffold/templates",
|
|
70
|
+
"clean": "rm -rf dist",
|
|
71
|
+
"test": "NODE_OPTIONS=--no-experimental-strip-types mocha --require ts-node/register test/**/*.ts --exit"
|
|
14
72
|
}
|
|
15
73
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 speed
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/tsconfig.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"removeComments": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"target": "es2017",
|
|
10
|
-
"sourceMap": true,
|
|
11
|
-
"outDir": "./",
|
|
12
|
-
"baseUrl": "./",
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"strictNullChecks": false,
|
|
15
|
-
"noImplicitAny": false,
|
|
16
|
-
"forceConsistentCasingInFileNames": false,
|
|
17
|
-
"noFallthroughCasesInSwitch": false,
|
|
18
|
-
"types": []
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
]
|
|
22
|
-
}
|