@basementuniverse/jsonpad-realtime-sdk 1.5.1 → 1.6.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.
Files changed (133) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/build/jsonpad-realtime-sdk.node.js +216 -0
  3. package/package.json +5 -2
  4. package/resources/jsonpad-realtime-sdk-test/build/index.d.ts +0 -1
  5. package/resources/jsonpad-realtime-sdk-test/build/index.js +0 -42
  6. package/resources/jsonpad-realtime-sdk-test/index.html +0 -52
  7. package/resources/jsonpad-realtime-sdk-test/index.js +0 -51
  8. package/resources/jsonpad-realtime-sdk-test/index.ts +0 -66
  9. package/resources/jsonpad-realtime-sdk-test/node_modules/.package-lock.json +0 -43
  10. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/LICENSE.txt +0 -55
  11. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/README.md +0 -50
  12. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/SECURITY.md +0 -41
  13. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
  14. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/bin/tsc +0 -2
  15. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/bin/tsserver +0 -2
  16. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/cancellationToken.js +0 -90
  17. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2087
  18. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2087
  19. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2087
  20. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2087
  21. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2087
  22. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2087
  23. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2087
  24. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.d.ts +0 -22
  25. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.decorators.d.ts +0 -386
  26. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  27. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  28. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.dom.d.ts +0 -28087
  29. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -491
  30. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  31. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  32. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  33. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  34. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -527
  35. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  36. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  37. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  38. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  39. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  40. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  41. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  42. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  43. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  44. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2017.d.ts +0 -25
  45. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  46. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  47. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  48. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  49. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  50. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  51. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  52. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  53. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  54. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  55. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  56. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  57. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  58. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  59. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  60. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  61. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  62. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  63. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  64. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  65. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  66. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -727
  67. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  68. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  69. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  70. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  71. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  72. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  73. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -97
  74. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -42
  75. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  76. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  77. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  78. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  79. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  80. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  81. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -76
  82. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  83. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.d.ts +0 -26
  84. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -73
  85. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  86. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -121
  87. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  88. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  89. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts +0 -39
  90. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  91. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  92. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  93. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  94. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  95. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  96. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es5.d.ts +0 -4585
  97. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  98. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  99. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -106
  100. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  101. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  102. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  103. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  104. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  105. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  106. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.object.d.ts +0 -29
  107. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -35
  108. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.regexp.d.ts +0 -25
  109. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.esnext.string.d.ts +0 -29
  110. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  111. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  112. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.webworker.d.ts +0 -9410
  113. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  114. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -288
  115. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2087
  116. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2087
  117. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2087
  118. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2087
  119. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/tsc.js +0 -130769
  120. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/tsserver.js +0 -623
  121. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
  122. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/tsserverlibrary.js +0 -21
  123. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/typesMap.json +0 -497
  124. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/typescript.d.ts +0 -11328
  125. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/typescript.js +0 -196068
  126. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/typingsInstaller.js +0 -236
  127. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/watchGuard.js +0 -53
  128. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2087
  129. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2087
  130. package/resources/jsonpad-realtime-sdk-test/node_modules/typescript/package.json +0 -121
  131. package/resources/jsonpad-realtime-sdk-test/package-lock.json +0 -54
  132. package/resources/jsonpad-realtime-sdk-test/package.json +0 -17
  133. package/resources/jsonpad-realtime-sdk-test/tsconfig.json +0 -25
@@ -1,236 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation. All rights reserved.
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
- this file except in compliance with the License. You may obtain a copy of the
5
- License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
- MERCHANTABLITY OR NON-INFRINGEMENT.
11
-
12
- See the Apache Version 2.0 License for specific language governing permissions
13
- and limitations under the License.
14
- ***************************************************************************** */
15
-
16
-
17
- "use strict";
18
- var __create = Object.create;
19
- var __defProp = Object.defineProperty;
20
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
21
- var __getOwnPropNames = Object.getOwnPropertyNames;
22
- var __getProtoOf = Object.getPrototypeOf;
23
- var __hasOwnProp = Object.prototype.hasOwnProperty;
24
- var __export = (target, all) => {
25
- for (var name in all)
26
- __defProp(target, name, { get: all[name], enumerable: true });
27
- };
28
- var __copyProps = (to, from, except, desc) => {
29
- if (from && typeof from === "object" || typeof from === "function") {
30
- for (let key of __getOwnPropNames(from))
31
- if (!__hasOwnProp.call(to, key) && key !== except)
32
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
- }
34
- return to;
35
- };
36
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
37
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
- // If the importer is in node compatibility mode or this is not an ESM
39
- // file that has been converted to a CommonJS file using a Babel-
40
- // compatible transform (i.e. "__esModule" has not been set), then set
41
- // "default" to the CommonJS "module.exports" for node compatibility.
42
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
- mod
44
- ));
45
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
-
47
- // src/typingsInstaller/nodeTypingsInstaller.ts
48
- var nodeTypingsInstaller_exports = {};
49
- __export(nodeTypingsInstaller_exports, {
50
- NodeTypingsInstaller: () => NodeTypingsInstaller
51
- });
52
- module.exports = __toCommonJS(nodeTypingsInstaller_exports);
53
- var import_child_process = require("child_process");
54
- var fs = __toESM(require("fs"));
55
- var path = __toESM(require("path"));
56
-
57
- // src/typescript/typescript.ts
58
- var typescript_exports = {};
59
- __reExport(typescript_exports, require("./typescript.js"));
60
-
61
- // src/typingsInstaller/nodeTypingsInstaller.ts
62
- var FileLog = class {
63
- constructor(logFile) {
64
- this.logFile = logFile;
65
- this.isEnabled = () => {
66
- return typeof this.logFile === "string";
67
- };
68
- this.writeLine = (text) => {
69
- if (typeof this.logFile !== "string") return;
70
- try {
71
- fs.appendFileSync(this.logFile, `[${typescript_exports.server.nowString()}] ${text}${typescript_exports.sys.newLine}`);
72
- } catch {
73
- this.logFile = void 0;
74
- }
75
- };
76
- }
77
- };
78
- function getDefaultNPMLocation(processName, validateDefaultNpmLocation2, host) {
79
- if (path.basename(processName).indexOf("node") === 0) {
80
- const npmPath = path.join(path.dirname(process.argv[0]), "npm");
81
- if (!validateDefaultNpmLocation2) {
82
- return npmPath;
83
- }
84
- if (host.fileExists(npmPath)) {
85
- return `"${npmPath}"`;
86
- }
87
- }
88
- return "npm";
89
- }
90
- function loadTypesRegistryFile(typesRegistryFilePath, host, log2) {
91
- if (!host.fileExists(typesRegistryFilePath)) {
92
- if (log2.isEnabled()) {
93
- log2.writeLine(`Types registry file '${typesRegistryFilePath}' does not exist`);
94
- }
95
- return /* @__PURE__ */ new Map();
96
- }
97
- try {
98
- const content = JSON.parse(host.readFile(typesRegistryFilePath));
99
- return new Map(Object.entries(content.entries));
100
- } catch (e) {
101
- if (log2.isEnabled()) {
102
- log2.writeLine(`Error when loading types registry file '${typesRegistryFilePath}': ${e.message}, ${e.stack}`);
103
- }
104
- return /* @__PURE__ */ new Map();
105
- }
106
- }
107
- var typesRegistryPackageName = "types-registry";
108
- function getTypesRegistryFileLocation(globalTypingsCacheLocation2) {
109
- return (0, typescript_exports.combinePaths)((0, typescript_exports.normalizeSlashes)(globalTypingsCacheLocation2), `node_modules/${typesRegistryPackageName}/index.json`);
110
- }
111
- var NodeTypingsInstaller = class extends typescript_exports.server.typingsInstaller.TypingsInstaller {
112
- constructor(globalTypingsCacheLocation2, typingSafeListLocation2, typesMapLocation2, npmLocation2, validateDefaultNpmLocation2, throttleLimit, log2) {
113
- const libDirectory = (0, typescript_exports.getDirectoryPath)((0, typescript_exports.normalizePath)(typescript_exports.sys.getExecutingFilePath()));
114
- super(
115
- typescript_exports.sys,
116
- globalTypingsCacheLocation2,
117
- typingSafeListLocation2 ? (0, typescript_exports.toPath)(typingSafeListLocation2, "", (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)) : (0, typescript_exports.toPath)("typingSafeList.json", libDirectory, (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)),
118
- typesMapLocation2 ? (0, typescript_exports.toPath)(typesMapLocation2, "", (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)) : (0, typescript_exports.toPath)("typesMap.json", libDirectory, (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)),
119
- throttleLimit,
120
- log2
121
- );
122
- this.npmPath = npmLocation2 !== void 0 ? npmLocation2 : getDefaultNPMLocation(process.argv[0], validateDefaultNpmLocation2, this.installTypingHost);
123
- if (this.npmPath.includes(" ") && this.npmPath[0] !== `"`) {
124
- this.npmPath = `"${this.npmPath}"`;
125
- }
126
- if (this.log.isEnabled()) {
127
- this.log.writeLine(`Process id: ${process.pid}`);
128
- this.log.writeLine(`NPM location: ${this.npmPath} (explicit '${typescript_exports.server.Arguments.NpmLocation}' ${npmLocation2 === void 0 ? "not " : ""} provided)`);
129
- this.log.writeLine(`validateDefaultNpmLocation: ${validateDefaultNpmLocation2}`);
130
- }
131
- this.ensurePackageDirectoryExists(globalTypingsCacheLocation2);
132
- try {
133
- if (this.log.isEnabled()) {
134
- this.log.writeLine(`Updating ${typesRegistryPackageName} npm package...`);
135
- }
136
- this.execSyncAndLog(`${this.npmPath} install --ignore-scripts ${typesRegistryPackageName}@${this.latestDistTag}`, { cwd: globalTypingsCacheLocation2 });
137
- if (this.log.isEnabled()) {
138
- this.log.writeLine(`Updated ${typesRegistryPackageName} npm package`);
139
- }
140
- } catch (e) {
141
- if (this.log.isEnabled()) {
142
- this.log.writeLine(`Error updating ${typesRegistryPackageName} package: ${e.message}`);
143
- }
144
- this.delayedInitializationError = {
145
- kind: "event::initializationFailed",
146
- message: e.message,
147
- stack: e.stack
148
- };
149
- }
150
- this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation2), this.installTypingHost, this.log);
151
- }
152
- handleRequest(req) {
153
- if (this.delayedInitializationError) {
154
- this.sendResponse(this.delayedInitializationError);
155
- this.delayedInitializationError = void 0;
156
- }
157
- super.handleRequest(req);
158
- }
159
- sendResponse(response) {
160
- if (this.log.isEnabled()) {
161
- this.log.writeLine(`Sending response:${typescript_exports.server.stringifyIndented(response)}`);
162
- }
163
- process.send(response);
164
- if (this.log.isEnabled()) {
165
- this.log.writeLine(`Response has been sent.`);
166
- }
167
- }
168
- installWorker(requestId, packageNames, cwd, onRequestCompleted) {
169
- if (this.log.isEnabled()) {
170
- this.log.writeLine(`#${requestId} with cwd: ${cwd} arguments: ${JSON.stringify(packageNames)}`);
171
- }
172
- const start = Date.now();
173
- const hasError = typescript_exports.server.typingsInstaller.installNpmPackages(this.npmPath, typescript_exports.version, packageNames, (command) => this.execSyncAndLog(command, { cwd }));
174
- if (this.log.isEnabled()) {
175
- this.log.writeLine(`npm install #${requestId} took: ${Date.now() - start} ms`);
176
- }
177
- onRequestCompleted(!hasError);
178
- }
179
- /** Returns 'true' in case of error. */
180
- execSyncAndLog(command, options) {
181
- if (this.log.isEnabled()) {
182
- this.log.writeLine(`Exec: ${command}`);
183
- }
184
- try {
185
- const stdout = (0, import_child_process.execSync)(command, { ...options, encoding: "utf-8" });
186
- if (this.log.isEnabled()) {
187
- this.log.writeLine(` Succeeded. stdout:${indent(typescript_exports.sys.newLine, stdout)}`);
188
- }
189
- return false;
190
- } catch (error) {
191
- const { stdout, stderr } = error;
192
- this.log.writeLine(` Failed. stdout:${indent(typescript_exports.sys.newLine, stdout)}${typescript_exports.sys.newLine} stderr:${indent(typescript_exports.sys.newLine, stderr)}`);
193
- return true;
194
- }
195
- }
196
- };
197
- var logFilePath = typescript_exports.server.findArgument(typescript_exports.server.Arguments.LogFile);
198
- var globalTypingsCacheLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.GlobalCacheLocation);
199
- var typingSafeListLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.TypingSafeListLocation);
200
- var typesMapLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.TypesMapLocation);
201
- var npmLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.NpmLocation);
202
- var validateDefaultNpmLocation = typescript_exports.server.hasArgument(typescript_exports.server.Arguments.ValidateDefaultNpmLocation);
203
- var log = new FileLog(logFilePath);
204
- if (log.isEnabled()) {
205
- process.on("uncaughtException", (e) => {
206
- log.writeLine(`Unhandled exception: ${e} at ${e.stack}`);
207
- });
208
- }
209
- process.on("disconnect", () => {
210
- if (log.isEnabled()) {
211
- log.writeLine(`Parent process has exited, shutting down...`);
212
- }
213
- process.exit(0);
214
- });
215
- var installer;
216
- process.on("message", (req) => {
217
- installer ?? (installer = new NodeTypingsInstaller(
218
- globalTypingsCacheLocation,
219
- typingSafeListLocation,
220
- typesMapLocation,
221
- npmLocation,
222
- validateDefaultNpmLocation,
223
- /*throttleLimit*/
224
- 5,
225
- log
226
- ));
227
- installer.handleRequest(req);
228
- });
229
- function indent(newline, str) {
230
- return str && str.length ? `${newline} ` + str.replace(/\r?\n/, `${newline} `) : "";
231
- }
232
- // Annotate the CommonJS export names for ESM import in node:
233
- 0 && (module.exports = {
234
- NodeTypingsInstaller
235
- });
236
- //# sourceMappingURL=typingsInstaller.js.map
@@ -1,53 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation. All rights reserved.
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
- this file except in compliance with the License. You may obtain a copy of the
5
- License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
- MERCHANTABLITY OR NON-INFRINGEMENT.
11
-
12
- See the Apache Version 2.0 License for specific language governing permissions
13
- and limitations under the License.
14
- ***************************************************************************** */
15
-
16
-
17
- "use strict";
18
- var __create = Object.create;
19
- var __defProp = Object.defineProperty;
20
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
21
- var __getOwnPropNames = Object.getOwnPropertyNames;
22
- var __getProtoOf = Object.getPrototypeOf;
23
- var __hasOwnProp = Object.prototype.hasOwnProperty;
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") {
26
- for (let key of __getOwnPropNames(from))
27
- if (!__hasOwnProp.call(to, key) && key !== except)
28
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
- }
30
- return to;
31
- };
32
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
- // If the importer is in node compatibility mode or this is not an ESM
34
- // file that has been converted to a CommonJS file using a Babel-
35
- // compatible transform (i.e. "__esModule" has not been set), then set
36
- // "default" to the CommonJS "module.exports" for node compatibility.
37
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
- mod
39
- ));
40
-
41
- // src/watchGuard/watchGuard.ts
42
- var fs = __toESM(require("fs"));
43
- if (process.argv.length < 3) {
44
- process.exit(1);
45
- }
46
- var directoryName = process.argv[2];
47
- try {
48
- const watcher = fs.watch(directoryName, { recursive: true }, () => ({}));
49
- watcher.close();
50
- } catch {
51
- }
52
- process.exit(0);
53
- //# sourceMappingURL=watchGuard.js.map