conductor-node 11.6.0 → 11.6.2
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
CHANGED
|
@@ -76,7 +76,7 @@ async function main() {
|
|
|
76
76
|
const endUser = await conductor.endUsers.create({
|
|
77
77
|
sourceId: "{{UNIQUE_ID_FROM_YOUR_DB}}",
|
|
78
78
|
email: "{{END_USER_EMAIL}}",
|
|
79
|
-
|
|
79
|
+
companyName: "{{END_USER_COMPANY_NAME}}",
|
|
80
80
|
});
|
|
81
81
|
console.log("Save this EndUser ID to auth future requests:", endUser.id);
|
|
82
82
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "11.6.
|
|
3
|
+
"version": "11.6.2",
|
|
4
4
|
"description": "QuickBooks Desktop API for Node.js and TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"QuickBooks",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"scripts": {
|
|
31
31
|
"clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
|
|
32
32
|
"delete-compiled-dev-files": "rm -rf `find ./dist -type d -name __tests__` ./dist/src/utils/test/*",
|
|
33
|
-
"diff": "
|
|
34
|
-
"prepack": "
|
|
33
|
+
"diff": "pnpm pack && npm diff --diff=conductor-node@latest --diff=conductor-node-$(node -p \"require('./package.json').version\").tgz && pnpm clean",
|
|
34
|
+
"prepack": "pnpm tsc && pnpm delete-compiled-dev-files && pnpm tsc-alias",
|
|
35
35
|
"postpack": "rm -rf dist",
|
|
36
|
-
"prepublishOnly": "
|
|
36
|
+
"prepublishOnly": "pnpm jest"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"axios": "^1.
|
|
39
|
+
"axios": "^1.6.8"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"axios-mock-adapter": "^1.
|
|
43
|
-
"tsc-alias": "^1.
|
|
42
|
+
"axios-mock-adapter": "^1.22.0",
|
|
43
|
+
"tsc-alias": "^1.8.8"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=16"
|
|
@@ -24,13 +24,13 @@ export interface EndUser {
|
|
|
24
24
|
/**
|
|
25
25
|
* Your end-user's company name that will be shown elsewhere in Conductor.
|
|
26
26
|
*/
|
|
27
|
-
readonly
|
|
27
|
+
readonly companyName: string;
|
|
28
28
|
/**
|
|
29
29
|
* The time at which the object was created.
|
|
30
30
|
*/
|
|
31
31
|
readonly createdAt: string;
|
|
32
32
|
}
|
|
33
|
-
export type EndUserCreateInput = Pick<EndUser, "
|
|
33
|
+
export type EndUserCreateInput = Pick<EndUser, "companyName" | "email" | "sourceId">;
|
|
34
34
|
export interface EndUserPingOutput {
|
|
35
35
|
/**
|
|
36
36
|
* The time, in milliseconds, that it took to ping the connection.
|
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.createFramedMessage = exports.checkForUpdates = void 0;
|
|
7
7
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
8
8
|
const env_1 = require("../utils/env");
|
|
9
|
-
const
|
|
9
|
+
const axios_1 = __importDefault(require("axios"));
|
|
10
10
|
function checkForUpdates() {
|
|
11
|
-
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/dot-notation -- ESLint is incorrectly following the global type modification that `next` makes in other packages of this monorepo where it is a dependency. TypeScript correctly limits the scope of this `next` type modification to only the packages where `next` is a dependency. ESLint does not; hence, we disable this rule here.
|
|
12
|
+
if (process.env["NODE_ENV"] === "test") {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
15
|
// `CONDUCTOR_HIDE_UPDATE_MESSAGE` hides the update message that is logged
|
|
@@ -16,32 +17,31 @@ function checkForUpdates() {
|
|
|
16
17
|
if ((0, env_1.isEnvironmentVariableTruthy)("CONDUCTOR_HIDE_UPDATE_MESSAGE")) {
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
|
-
// Exit early if `npm` is not installed.
|
|
20
|
-
try {
|
|
21
|
-
node_child_process_1.default.execSync("npm --version", {
|
|
22
|
-
// Prevent the shell from internally logging the error message.
|
|
23
|
-
stdio: "ignore",
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
20
|
const currentVersion = package_json_1.default.version;
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
.
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
""
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
21
|
+
const packageName = encodeURIComponent(package_json_1.default.name);
|
|
22
|
+
axios_1.default
|
|
23
|
+
.get(`https://registry.npmjs.org/-/package/${packageName}/dist-tags`)
|
|
24
|
+
.then((response) => {
|
|
25
|
+
const latestVersion = response.data.latest;
|
|
26
|
+
if (currentVersion !== latestVersion) {
|
|
27
|
+
let updateCommand = "npm install";
|
|
28
|
+
if (process.env["npm_execpath"]?.includes("yarn") === true) {
|
|
29
|
+
updateCommand = "yarn add";
|
|
30
|
+
}
|
|
31
|
+
else if (process.env["npm_execpath"]?.includes("pnpm") === true) {
|
|
32
|
+
updateCommand = "pnpm add";
|
|
33
|
+
}
|
|
34
|
+
console.warn(createFramedMessage([
|
|
35
|
+
`🟡 Update available for Conductor! ${currentVersion} -> ${latestVersion}`,
|
|
36
|
+
"",
|
|
37
|
+
"Run the following to update:",
|
|
38
|
+
` ${updateCommand} ${packageName}@latest`,
|
|
39
|
+
]));
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
.catch((error) => {
|
|
43
|
+
console.debug("Failed to check for updates:", error);
|
|
44
|
+
});
|
|
45
45
|
}
|
|
46
46
|
exports.checkForUpdates = checkForUpdates;
|
|
47
47
|
function createFramedMessage(messageLines) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "11.6.
|
|
3
|
+
"version": "11.6.2",
|
|
4
4
|
"description": "QuickBooks Desktop API for Node.js and TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"QuickBooks",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"scripts": {
|
|
31
31
|
"clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
|
|
32
32
|
"delete-compiled-dev-files": "rm -rf `find ./dist -type d -name __tests__` ./dist/src/utils/test/*",
|
|
33
|
-
"diff": "
|
|
34
|
-
"prepack": "
|
|
33
|
+
"diff": "pnpm pack && npm diff --diff=conductor-node@latest --diff=conductor-node-$(node -p \"require('./package.json').version\").tgz && pnpm clean",
|
|
34
|
+
"prepack": "pnpm tsc && pnpm delete-compiled-dev-files && pnpm tsc-alias",
|
|
35
35
|
"postpack": "rm -rf dist",
|
|
36
|
-
"prepublishOnly": "
|
|
36
|
+
"prepublishOnly": "pnpm jest"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"axios": "^1.
|
|
39
|
+
"axios": "^1.6.8"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"axios-mock-adapter": "^1.
|
|
43
|
-
"tsc-alias": "^1.
|
|
42
|
+
"axios-mock-adapter": "^1.22.0",
|
|
43
|
+
"tsc-alias": "^1.8.8"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=16"
|