@inipa/common 1.0.17
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/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +18 -0
- package/build/index.js.map +1 -0
- package/build/tool/index.d.ts +2 -0
- package/build/tool/index.d.ts.map +1 -0
- package/build/tool/index.js +18 -0
- package/build/tool/index.js.map +1 -0
- package/build/tool/require.d.ts +10 -0
- package/build/tool/require.d.ts.map +1 -0
- package/build/tool/require.js +35 -0
- package/build/tool/require.js.map +1 -0
- package/package.json +35 -0
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
__exportStar(require("./tool/index.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tool/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
__exportStar(require("./require.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tool/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GraphQLClient } from "graphql-request";
|
|
2
|
+
export declare class Ihttp {
|
|
3
|
+
protected readonly httpsEndpoint = "https://mapi.inipaipos.com/graphql";
|
|
4
|
+
protected readonly httpEndpoint = "https://uat-api.inipaipos.com/graphql";
|
|
5
|
+
protected readonly httpsClient: GraphQLClient;
|
|
6
|
+
protected readonly httpClient: GraphQLClient;
|
|
7
|
+
constructor(token?: string);
|
|
8
|
+
getContinent(): Promise<any>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=require.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require.d.ts","sourceRoot":"","sources":["../../src/tool/require.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,qBAAa,KAAK;IAChB,SAAS,CAAC,QAAQ,CAAC,aAAa,wCAAwC;IACxE,SAAS,CAAC,QAAQ,CAAC,YAAY,2CAA2C;IAC1E,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC;IAC9C,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;gBAEjC,KAAK,GAAE,MAAW;IAQxB,YAAY;CAcnB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Ihttp = void 0;
|
|
4
|
+
const graphql_request_1 = require("graphql-request");
|
|
5
|
+
const httpsEndpoint = "https://mapi.inipaipos.com/graphql";
|
|
6
|
+
class Ihttp {
|
|
7
|
+
httpsEndpoint = "https://mapi.inipaipos.com/graphql";
|
|
8
|
+
httpEndpoint = "https://uat-api.inipaipos.com/graphql";
|
|
9
|
+
httpsClient;
|
|
10
|
+
httpClient;
|
|
11
|
+
constructor(token = "") {
|
|
12
|
+
this.httpsClient = new graphql_request_1.GraphQLClient(this.httpsEndpoint, {
|
|
13
|
+
headers: {
|
|
14
|
+
authorization: token,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
this.httpClient = new graphql_request_1.GraphQLClient(this.httpEndpoint);
|
|
18
|
+
}
|
|
19
|
+
async getContinent() {
|
|
20
|
+
const query = (0, graphql_request_1.gql) `
|
|
21
|
+
query {
|
|
22
|
+
continentList {
|
|
23
|
+
id
|
|
24
|
+
chineseName
|
|
25
|
+
name
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
const result = await this.httpsClient.request(query);
|
|
30
|
+
console.log('result', result);
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.Ihttp = Ihttp;
|
|
35
|
+
//# sourceMappingURL=require.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require.js","sourceRoot":"","sources":["../../src/tool/require.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAC3D,MAAa,KAAK;IACG,aAAa,GAAG,oCAAoC,CAAC;IACrD,YAAY,GAAG,uCAAuC,CAAC;IACvD,WAAW,CAAgB;IAC3B,UAAU,CAAgB;IAE7C,YAAY,QAAgB,EAAE;QAC5B,IAAI,CAAC,WAAW,GAAG,IAAI,+BAAa,CAAC,IAAI,CAAC,aAAa,EAAE;YACvD,OAAO,EAAE;gBACP,aAAa,EAAE,KAAK;aACrB;SACF,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,IAAI,+BAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACzD,CAAC;IACD,KAAK,CAAC,YAAY;QAChB,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;SAQZ,CAAC;QACN,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9B,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA5BD,sBA4BC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inipa/common",
|
|
3
|
+
"version": "1.0.17",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./build/index.js",
|
|
6
|
+
"types": "./build/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"./build/**/*"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"clean": "del ./build/*",
|
|
12
|
+
"build": "npm run clean && tsc && tsc-alias",
|
|
13
|
+
"pub": "git add . && git commit -m \"updated\" && npm version patch && npm run build && npm publish --access publish",
|
|
14
|
+
"pub:minor": "git add . && git commit -m \"updated\" && npm version minor && npm run build && npm publish --access publish",
|
|
15
|
+
"pub:major": "git add . && git commit -m \"updated\" && npm version major && npm run build && npm publish --access publish"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [],
|
|
18
|
+
"author": "",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@apollo/client": "^4.1.6",
|
|
22
|
+
"graphql": "^16.13.1",
|
|
23
|
+
"graphql-request": "^7.4.0",
|
|
24
|
+
"rxjs": "^7.8.2"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"del-cli": "^7.0.0",
|
|
28
|
+
"tsc-alias": "^1.8.16",
|
|
29
|
+
"typescript": "^5.9.3"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"registry": "https://registry.npmjs.org/"
|
|
34
|
+
}
|
|
35
|
+
}
|