@gibme/ipinfo 1.0.0 → 1.0.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/dist/web.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { CheckIPResponse } from './types';
2
+ /**
3
+ * Looks up information regarding the IP address supplied; OR,
4
+ * if no address is supplied, looks up information regarding
5
+ * our client's IP address
6
+ *
7
+ * @param address
8
+ * @constructor
9
+ */
10
+ export declare const CheckIP: (address?: string) => Promise<CheckIPResponse | undefined>;
@@ -31,19 +31,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
31
31
  return (mod && mod.__esModule) ? mod : { "default": mod };
32
32
  };
33
33
  Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.CheckIP = exports.IPInfo = void 0;
35
- const helpers_1 = __importDefault(require("./helpers"));
34
+ exports.CheckIP = void 0;
36
35
  const fetch_1 = __importDefault(require("@gibme/fetch"));
37
- /**
38
- * Looks up information regarding the IP address supplied
39
- *
40
- * @param address
41
- * @param max_retries
42
- */
43
- const IPInfo = (address_1, ...args_1) => __awaiter(void 0, [address_1, ...args_1], void 0, function* (address, max_retries = 3) {
44
- return helpers_1.default.getPrefix(address, max_retries);
45
- });
46
- exports.IPInfo = IPInfo;
47
36
  /**
48
37
  * Looks up information regarding the IP address supplied; OR,
49
38
  * if no address is supplied, looks up information regarding
@@ -85,8 +74,4 @@ const CheckIP = (address) => __awaiter(void 0, void 0, void 0, function* () {
85
74
  };
86
75
  });
87
76
  exports.CheckIP = CheckIP;
88
- exports.default = {
89
- IPInfo: exports.IPInfo,
90
- CheckIP: exports.CheckIP
91
- };
92
- //# sourceMappingURL=ipinfo.js.map
77
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC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,CAAC,IAAI;QACf,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;QACjD,EAAE,EAAE;YACA,GAAG;YACH,IAAI;SACP;KACJ,CAAC;AACN,CAAC,CAAA,CAAC;AAxCW,QAAA,OAAO,WAwClB"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@gibme/ipinfo",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A simple IP information lookup helper using Team CYMRU services",
5
- "main": "dist/ipinfo.js",
6
- "types": "dist/ipinfo.d.ts",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
7
  "files": [
8
8
  "dist/*"
9
9
  ],
@@ -12,6 +12,7 @@
12
12
  "build": "yarn build:typescript",
13
13
  "build:docs": "./node_modules/.bin/typedoc",
14
14
  "build:typescript": "./node_modules/.bin/tsc",
15
+ "build:webpack": "./node_modules/.bin/auto-pack",
15
16
  "test": "yarn test:style && yarn test:typecheck && yarn test:mocha",
16
17
  "test:typecheck": "./node_modules/.bin/tsc --noEmit",
17
18
  "test:style": "yarn style",
@@ -19,7 +20,7 @@
19
20
  "style": "./node_modules/.bin/eslint src/**/*.ts test/**/*.ts",
20
21
  "fix-style": "./node_modules/.bin/eslint --fix src/**/*.ts test/**/*.ts",
21
22
  "fix:style": "yarn fix-style",
22
- "prepublishOnly": "yarn build"
23
+ "prepublishOnly": "yarn build && yarn build:webpack"
23
24
  },
24
25
  "repository": {
25
26
  "type": "git",
@@ -38,9 +39,16 @@
38
39
  "email": "brandonlehmann@gmail.com"
39
40
  },
40
41
  "dependencies": {
41
- "@gibme/fetch": "^1.0.7"
42
+ "@gibme/fetch": "^1.0.14"
43
+ },
44
+ "webpack": {
45
+ "entry": {
46
+ "ipinfo": "./src/web.ts"
47
+ },
48
+ "filename": "[name].min.js"
42
49
  },
43
50
  "devDependencies": {
51
+ "@gibme/auto-pack": "^0.4.2",
44
52
  "@types/mocha": "^10.0.6",
45
53
  "@types/node": "^20.11.7",
46
54
  "@typescript-eslint/eslint-plugin": "^6.19.1",
package/dist/ipinfo.d.ts DELETED
@@ -1,22 +0,0 @@
1
- import { CheckIPResponse, PrefixInfo } from './types';
2
- /**
3
- * Looks up information regarding the IP address supplied
4
- *
5
- * @param address
6
- * @param max_retries
7
- */
8
- export declare const IPInfo: (address: string, max_retries?: number) => Promise<PrefixInfo | undefined>;
9
- /**
10
- * Looks up information regarding the IP address supplied; OR,
11
- * if no address is supplied, looks up information regarding
12
- * our client's IP address
13
- *
14
- * @param address
15
- * @constructor
16
- */
17
- export declare const CheckIP: (address?: string) => Promise<CheckIPResponse | undefined>;
18
- declare const _default: {
19
- IPInfo: (address: string, max_retries?: number) => Promise<PrefixInfo | undefined>;
20
- CheckIP: (address?: string) => Promise<CheckIPResponse | undefined>;
21
- };
22
- export default _default;
@@ -1 +0,0 @@
1
- {"version":3,"file":"ipinfo.js","sourceRoot":"","sources":["../src/ipinfo.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;;;;;;;;;;;;;;;AAGZ,wDAAgC;AAChC,yDAAiC;AAEjC;;;;;GAKG;AACI,MAAM,MAAM,GAAG,uBAGa,EAAE,8DAF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