@microsoft/metrics-ts 0.0.11-alpha.af65c620e.0 → 0.0.11-alpha.afab8dce5b.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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/capability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/capability/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MSTimer = void 0;
4
+ // Copyright (c) Microsoft Corporation.
5
+ // Licensed under the MIT license.
4
6
  var timer_1 = require("./timer");
5
7
  Object.defineProperty(exports, "MSTimer", { enumerable: true, get: function () { return timer_1.MSTimer; } });
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capability/index.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAAzB,gGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capability/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iCAAkC;AAAzB,gGAAA,OAAO,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../src/capability/timer.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,OAAO,OAAQ,MAAM,cAGhB,GAAG,eAAe,MAAM,cAAc,kBAAkB,uBAiEzE,CAAC"}
1
+ {"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../src/capability/timer.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,OAAO,GAAI,IAAI,MAAM,MAGxB,QAAQ,GAAG,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,uBAiEzE,CAAC"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MSTimer = void 0;
4
- /**
5
- * Timer - measures call-rate of a function and the distribution of the duration of all calls
6
- */
4
+ // Copyright (c) Microsoft Corporation.
5
+ // Licensed under the MIT license.
7
6
  const perf_hooks_1 = require("perf_hooks");
8
7
  const rawData_1 = require("../rawData");
9
8
  const tracing_1 = require("../tracing");
@@ -16,7 +15,6 @@ const fast = 1;
16
15
  const normal = 20;
17
16
  const MSTimer = (fn) => {
18
17
  /* eslint-disable @typescript-eslint/no-explicit-any */
19
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
20
18
  return (target, propertyKey, descriptor) => {
21
19
  const originalMethod = descriptor.value;
22
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"timer.js","sourceRoot":"","sources":["../../src/capability/timer.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,2CAAyC;AACzC,wCAAkE;AAClE,wCAAqC;AACrC,sCAA2D;AAE3D;;;GAGG;AACH,MAAM,IAAI,GAAG,CAAC,CAAC;AACf,MAAM,MAAM,GAAG,EAAE,CAAC;AAEX,MAAM,OAAO,GAAG,CAAC,EAAU,EAAE,EAAE;IACpC,wDAAwD;IACxD,uEAAuE;IACvE,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,UAA8B,EAAE,EAAE;QAC1E,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;QAExC;;WAEG;QACH,MAAM,IAAI,GAAe;YACvB,OAAO,EAAE,IAAA,iBAAO,GAAE;YAClB,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI;YAC9B,MAAM,EAAE,cAAc,CAAC,IAAI;YAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC;QAEF,IAAI,cAAc,CAAC,WAAW,CAA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QAAQ,GAAG,uBAAa,CAAC,IAAI,CAAC;gBAChC,CAAC;qBAAM,IAAI,QAAQ,GAAG,IAAI,EAAE,CAAC;oBAC3B,QAAQ,GAAG,uBAAa,CAAC,MAAM,CAAC;gBAClC,CAAC;qBAAM,CAAC;oBACN,QAAQ,GAAG,uBAAa,CAAC,IAAI,CAAC;gBAChC,CAAC;gBACD,MAAM,SAAS,GAAc;oBAC3B,QAAQ,EAAE,QAAQ;oBAClB,QAAQ,EAAE,QAAQ;iBACnB,CAAC;gBAEF,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;gBAEvB,IAAA,yBAAgB,EAAC,IAAI,CAAC,CAAC;gBACvB,OAAO,MAAM,CAAC;YAChB,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AApEW,QAAA,OAAO,WAoElB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC"}
package/build/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ // Copyright (c) Microsoft Corporation.
5
+ // Licensed under the MIT license.
4
6
  tslib_1.__exportStar(require("./capability"), exports);
5
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,uDAA6B"}
@@ -1 +1 @@
1
- {"version":3,"file":"rawData.d.ts","sourceRoot":"","sources":["../src/rawData.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAGhB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,aAAa,CAAC;CACzB"}
1
+ {"version":3,"file":"rawData.d.ts","sourceRoot":"","sources":["../src/rawData.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAGhB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,aAAa,CAAC;CACzB"}
package/build/rawData.js CHANGED
@@ -6,5 +6,5 @@ var TimerSeverity;
6
6
  TimerSeverity["Fast"] = "fast";
7
7
  TimerSeverity["Normal"] = "normal";
8
8
  TimerSeverity["Slow"] = "slow";
9
- })(TimerSeverity = exports.TimerSeverity || (exports.TimerSeverity = {}));
9
+ })(TimerSeverity || (exports.TimerSeverity = TimerSeverity = {}));
10
10
  //# sourceMappingURL=rawData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rawData.js","sourceRoot":"","sources":["../src/rawData.ts"],"names":[],"mappings":";;;AAaA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;IACjB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB"}
1
+ {"version":3,"file":"rawData.js","sourceRoot":"","sources":["../src/rawData.ts"],"names":[],"mappings":";;;AAeA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;IACjB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB"}
@@ -1 +1,2 @@
1
+ export {};
1
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC"}
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1,2 @@
1
+ export {};
1
2
  //# sourceMappingURL=json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/reporter/json.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/reporter/json.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC"}
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  //# sourceMappingURL=json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../src/tracing.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAQhC"}
1
+ {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../src/tracing.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAQhC"}
package/build/tracing.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.traceId = void 0;
3
+ exports.traceId = traceId;
4
+ // Copyright (c) Microsoft Corporation.
5
+ // Licensed under the MIT license.
4
6
  const process_1 = require("process");
5
7
  const uuid_1 = require("uuid");
6
8
  /**
@@ -16,5 +18,4 @@ function traceId() {
16
18
  return traceId;
17
19
  }
18
20
  }
19
- exports.traceId = traceId;
20
21
  //# sourceMappingURL=tracing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../src/tracing.ts"],"names":[],"mappings":";;;AAAA,qCAA8B;AAC9B,+BAAoC;AAEpC;;GAEG;AACH,SAAgB,OAAO;IACrB,IAAI,aAAG,CAAC,eAAe,EAAE;QACvB,OAAO,aAAG,CAAC,eAAe,CAAC;KAC5B;SAAM;QACL,MAAM,OAAO,GAAG,IAAA,SAAM,GAAE,CAAC;QACzB,aAAG,CAAC,eAAe,GAAG,OAAO,CAAC;QAC9B,OAAO,OAAO,CAAC;KAChB;AACH,CAAC;AARD,0BAQC"}
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../src/tracing.ts"],"names":[],"mappings":";;AAQA,0BAQC;AAhBD,uCAAuC;AACvC,kCAAkC;AAClC,qCAA8B;AAC9B,+BAAoC;AAEpC;;GAEG;AACH,SAAgB,OAAO;IACrB,IAAI,aAAG,CAAC,eAAe,EAAE,CAAC;QACxB,OAAO,aAAG,CAAC,eAAe,CAAC;IAC7B,CAAC;SAAM,CAAC;QACN,MAAM,OAAO,GAAG,IAAA,SAAM,GAAE,CAAC;QACzB,aAAG,CAAC,eAAe,GAAG,OAAO,CAAC;QAC9B,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAQvC,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAKlE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAKvD"}
1
+ {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAQvC,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAKlE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAKvD"}
package/build/writer.js CHANGED
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.appendOutputSync = exports.appendOutput = void 0;
3
+ exports.appendOutput = appendOutput;
4
+ exports.appendOutputSync = appendOutputSync;
5
+ // Copyright (c) Microsoft Corporation.
6
+ // Licensed under the MIT license.
4
7
  const path_1 = require("path");
5
8
  const fs_extra_1 = require("fs-extra");
6
9
  const os_1 = require("os");
@@ -13,12 +16,10 @@ async function appendOutput(data) {
13
16
  await (0, fs_extra_1.appendFile)(metricsFile, JSON.stringify(data) + os_1.EOL);
14
17
  return;
15
18
  }
16
- exports.appendOutput = appendOutput;
17
19
  function appendOutputSync(data) {
18
20
  (0, fs_extra_1.ensureDirSync)(metricsFolder);
19
21
  (0, fs_extra_1.ensureFileSync)(metricsFile);
20
22
  (0, fs_1.appendFileSync)(metricsFile, JSON.stringify(data) + os_1.EOL);
21
23
  return;
22
24
  }
23
- exports.appendOutputSync = appendOutputSync;
24
25
  //# sourceMappingURL=writer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"writer.js","sourceRoot":"","sources":["../src/writ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AAC,WAAW,CAAC,CAAC;IAC9B,MAAM,IAAA,qBAAU,EAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,QAAG,CAAC,CAAC;IAC1D,OAAO;AACT,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAgB;IAC/C,IAAA,wBAAa,EAAC,aAAa,CAAC,CAAC;IAC7B,IAAA,yBAAc,EAAC,WAAW,CAAC,CAAC;IAC5B,IAAA,mBAAc,EAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,QAAG,CAAC,CAAC;IACxD,OAAO;AACT,CAAC"}
@@ -0,0 +1,14 @@
1
+ import shared from "../eslint-plugin-teamsfx/config/shared.mjs";
2
+ import header from "../eslint-plugin-teamsfx/config/header.mjs";
3
+
4
+ export default [
5
+ ...shared,
6
+ {
7
+ languageOptions: {
8
+ parserOptions: {
9
+ tsconfigRootDir: import.meta.dirname,
10
+ },
11
+ },
12
+ },
13
+ { files: ["src/**/*.ts"], ...header },
14
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/metrics-ts",
3
- "version": "0.0.11-alpha.af65c620e.0",
3
+ "version": "0.0.11-alpha.afab8dce5b.0",
4
4
  "description": "Add metrics without intruding source code",
5
5
  "keywords": [
6
6
  "Metrics"
@@ -12,15 +12,13 @@
12
12
  "types": "build/index.d.ts",
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "git+https://github.com/OfficeDev/TeamsFx.git"
15
+ "url": "git+https://github.com/OfficeDev/microsoft-365-agents-toolkit.git"
16
16
  },
17
17
  "scripts": {
18
18
  "build": "rimraf build && npx tsc -p ./",
19
19
  "format-check": "echo test",
20
- "check-sensitive": "npx eslint --plugin 'no-secrets' --cache --ignore-pattern 'package.json' --ignore-pattern 'package-lock.json'",
21
- "precommit": "npm run check-sensitive && lint-staged",
22
- "lint": "eslint \"**/*.ts\"",
23
- "lint:staged": "lint-staged"
20
+ "precommit": "lint-staged",
21
+ "lint": "eslint \"**/*.ts\""
24
22
  },
25
23
  "bugs": {
26
24
  "url": "https://github.com/OfficeDev/TeamsFx/issues"
@@ -28,41 +26,42 @@
28
26
  "devDependencies": {
29
27
  "@istanbuljs/nyc-config-typescript": "^1.0.1",
30
28
  "@types/chai": "^4.2.21",
31
- "@types/mocha": "^8.2.3",
32
- "@types/node": "^16.0.0",
29
+ "@types/mocha": "^10.0.10",
30
+ "@types/node": "^22.15.0",
33
31
  "@types/uuid": "^8.3.4",
34
- "@typescript-eslint/eslint-plugin": "^4.19.0",
35
- "@typescript-eslint/parser": "^4.19.0",
36
32
  "chai": "^4.3.4",
37
- "eslint": "^7.22.0",
38
- "eslint-plugin-header": "^3.1.1",
39
- "eslint-plugin-import": "^2.25.2",
40
- "eslint-plugin-no-secrets": "^0.8.9",
41
- "eslint-plugin-prettier": "^4.0.0",
33
+ "eslint": "^9.0.0",
34
+ "eslint-config-prettier": "^10.1.0",
35
+ "eslint-plugin-headers": "^1.3.4",
36
+ "eslint-plugin-import-x": "^4.16.0",
37
+ "eslint-plugin-no-secrets": "^1.1.2",
38
+ "eslint-plugin-prettier": "^5.5.0",
39
+ "globals": "^16.2.0",
42
40
  "lint-staged": "^10.5.4",
43
- "mocha": "^9.2.1",
44
- "nyc": "^15.1.0",
45
- "prettier": "^2.4.1",
41
+ "mocha": "^11.0.0",
42
+ "nyc": "^17.1.0",
43
+ "prettier": "^3.3.3",
46
44
  "rimraf": "^5.0.1",
47
- "ts-node": "^10.1.0",
45
+ "ts-node": "^10.9.2",
48
46
  "tslint": "^6.1.3",
49
47
  "tslint-config-prettier": "^1.18.0",
50
48
  "ttypescript": "^1.5.13",
51
- "typescript": "^5.0.4"
49
+ "typescript": "~5.9.0",
50
+ "typescript-eslint": "^8.56.0"
52
51
  },
53
52
  "publishConfig": {
54
53
  "access": "public"
55
54
  },
56
55
  "lint-staged": {
57
56
  "*.{js,jsx,css,ts,tsx}": [
58
- "npx eslint --cache --fix --quiet"
57
+ "eslint --cache --fix --quiet",
58
+ "prettier --cache --write --ignore-unknown"
59
59
  ]
60
60
  },
61
61
  "dependencies": {
62
62
  "@types/fs-extra": "^11.0.1",
63
63
  "fs-extra": "^11.1.1",
64
64
  "tslib": "^2.3.1",
65
- "uuid": "^8.3.2"
66
- },
67
- "gitHead": "bb3f355d7eafd7b38e779d6e643e3b625dc2000e"
65
+ "uuid": "^11.1.1"
66
+ }
68
67
  }
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@microsoft/metrics-ts",
3
+ "version": "0.0.11-alpha.afab8dce5b.0",
4
+ "description": "Add metrics without intruding source code",
5
+ "keywords": [
6
+ "Metrics"
7
+ ],
8
+ "author": "Long Hao<haolong@microsoft.com>",
9
+ "homepage": "https://github.com/OfficeDev/TeamsFx#readme",
10
+ "license": "MIT",
11
+ "main": "build/index.js",
12
+ "types": "build/index.d.ts",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/OfficeDev/microsoft-365-agents-toolkit.git"
16
+ },
17
+ "scripts": {
18
+ "build": "rimraf build && npx tsc -p ./",
19
+ "format-check": "echo test",
20
+ "precommit": "lint-staged",
21
+ "lint": "eslint \"**/*.ts\""
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/OfficeDev/TeamsFx/issues"
25
+ },
26
+ "devDependencies": {
27
+ "@istanbuljs/nyc-config-typescript": "^1.0.1",
28
+ "@types/chai": "^4.2.21",
29
+ "@types/mocha": "^10.0.10",
30
+ "@types/node": "^22.15.0",
31
+ "@types/uuid": "^8.3.4",
32
+ "chai": "^4.3.4",
33
+ "eslint": "^9.0.0",
34
+ "eslint-config-prettier": "^10.1.0",
35
+ "eslint-plugin-headers": "^1.3.4",
36
+ "eslint-plugin-import-x": "^4.16.0",
37
+ "eslint-plugin-no-secrets": "^1.1.2",
38
+ "eslint-plugin-prettier": "^5.5.0",
39
+ "globals": "^16.2.0",
40
+ "lint-staged": "^10.5.4",
41
+ "mocha": "^11.0.0",
42
+ "nyc": "^17.1.0",
43
+ "prettier": "^3.3.3",
44
+ "rimraf": "^5.0.1",
45
+ "ts-node": "^10.9.2",
46
+ "tslint": "^6.1.3",
47
+ "tslint-config-prettier": "^1.18.0",
48
+ "ttypescript": "^1.5.13",
49
+ "typescript": "~5.9.0",
50
+ "typescript-eslint": "^8.56.0"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public"
54
+ },
55
+ "lint-staged": {
56
+ "*.{js,jsx,css,ts,tsx}": [
57
+ "eslint --cache --fix --quiet",
58
+ "prettier --cache --write --ignore-unknown"
59
+ ]
60
+ },
61
+ "dependencies": {
62
+ "@types/fs-extra": "^11.0.1",
63
+ "fs-extra": "^11.1.1",
64
+ "tslib": "^2.3.1",
65
+ "uuid": "^11.1.1"
66
+ }
67
+ }
@@ -1 +1,3 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
1
3
  export { MSTimer } from "./timer";
@@ -1,6 +1,5 @@
1
- /**
2
- * Timer - measures call-rate of a function and the distribution of the duration of all calls
3
- */
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
4
3
  import { performance } from "perf_hooks";
5
4
  import { timerData, TimerSeverity, tracePoint } from "../rawData";
6
5
  import { traceId } from "../tracing";
@@ -15,7 +14,7 @@ const normal = 20;
15
14
 
16
15
  export const MSTimer = (fn: string) => {
17
16
  /* eslint-disable @typescript-eslint/no-explicit-any */
18
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
17
+
19
18
  return (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {
20
19
  const originalMethod = descriptor.value;
21
20
 
package/src/index.ts CHANGED
@@ -1 +1,3 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
1
3
  export * from "./capability";
package/src/rawData.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
1
3
  export interface tracePoint {
2
4
  traceId: string;
3
5
  //pspanId: number;
@@ -0,0 +1,3 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ export {};
package/src/tracing.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
1
3
  import { env } from "process";
2
4
  import { v4 as uuidv4 } from "uuid";
3
5
 
package/src/writer.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
1
3
  import { join } from "path";
2
4
  import { tracePoint } from "./rawData";
3
5
  import { appendFile, ensureDir, ensureDirSync, ensureFile, ensureFileSync } from "fs-extra";
package/tsconfig.json CHANGED
@@ -3,9 +3,9 @@
3
3
  "experimentalDecorators": true,
4
4
  "emitDecoratorMetadata": true,
5
5
  "module": "CommonJS",
6
- "target": "es2017",
6
+ "target": "ES2022",
7
7
  "outDir": "build",
8
- "lib": ["es6"],
8
+ "lib": ["ES2022"],
9
9
  "allowJs": true,
10
10
  "importHelpers": true,
11
11
  "skipLibCheck": true,
package/.eslintrc.js DELETED
@@ -1,13 +0,0 @@
1
- module.exports = {
2
- parser: "@typescript-eslint/parser",
3
- parserOptions: {
4
- tsconfigRootDir: __dirname,
5
- },
6
- extends: ["../eslint-plugin-teamsfx/config/shared.js"],
7
- overrides: [
8
- {
9
- files: ["src/**/*.ts"],
10
- extends: ["../eslint-plugin-teamsfx/config/header.js"],
11
- },
12
- ],
13
- };
package/LICENSE DELETED
@@ -1,23 +0,0 @@
1
- Microsoft 365 Agents Toolkit for Visual Studio Code and Microsoft 365 Agents Toolkit CLI
2
-
3
- Copyright (c) Microsoft Corporation.
4
-
5
- MIT License
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.