pw-js-api 0.2.1 → 0.2.2-dev.8bac497

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 (49) hide show
  1. package/browser/pw.dev.js +162 -472
  2. package/browser/pw.prod.js +1 -1
  3. package/esm/api/PWApiClient.d.ts +182 -0
  4. package/esm/api/PWApiClient.js +247 -0
  5. package/esm/game/PWGameClient.d.ts +115 -0
  6. package/esm/game/PWGameClient.js +345 -0
  7. package/esm/gen/world_pb.d.ts +1301 -0
  8. package/esm/gen/world_pb.js +286 -0
  9. package/esm/index.d.ts +7 -0
  10. package/esm/index.js +10 -0
  11. package/esm/util/Bucket.d.ts +32 -0
  12. package/esm/util/Bucket.js +68 -0
  13. package/esm/util/Constants.d.ts +5 -0
  14. package/esm/util/Constants.js +6 -0
  15. package/esm/util/Errors.d.ts +4 -0
  16. package/esm/util/Errors.js +7 -0
  17. package/esm/util/Misc.d.ts +2 -0
  18. package/esm/util/Misc.js +51 -0
  19. package/esm/util/block.d.ts +1333 -0
  20. package/esm/util/block.js +1335 -0
  21. package/package.json +5 -6
  22. package/tsconfig-cm.json +8 -0
  23. package/tsconfig-esm.json +8 -0
  24. package/.npm-deprecaterc.json +0 -10
  25. package/buf.gen.yaml +0 -12
  26. package/esm.mjs +0 -18
  27. /package/{dist → cm}/api/PWApiClient.d.ts +0 -0
  28. /package/{dist → cm}/api/PWApiClient.js +0 -0
  29. /package/{dist → cm}/game/PWGameClient.d.ts +0 -0
  30. /package/{dist → cm}/game/PWGameClient.js +0 -0
  31. /package/{dist → cm}/gen/world_pb.d.ts +0 -0
  32. /package/{dist → cm}/gen/world_pb.js +0 -0
  33. /package/{dist → cm}/index.d.ts +0 -0
  34. /package/{dist → cm}/index.js +0 -0
  35. /package/{dist → cm}/util/Bucket.d.ts +0 -0
  36. /package/{dist → cm}/util/Bucket.js +0 -0
  37. /package/{dist → cm}/util/Constants.d.ts +0 -0
  38. /package/{dist → cm}/util/Constants.js +0 -0
  39. /package/{dist → cm}/util/Errors.d.ts +0 -0
  40. /package/{dist → cm}/util/Errors.js +0 -0
  41. /package/{dist → cm}/util/Misc.d.ts +0 -0
  42. /package/{dist → cm}/util/Misc.js +0 -0
  43. /package/{dist → cm}/util/block.d.ts +0 -0
  44. /package/{dist → cm}/util/block.js +0 -0
  45. /package/{dist → esm}/types/api.d.ts +0 -0
  46. /package/{dist → esm}/types/events.d.ts +0 -0
  47. /package/{dist → esm}/types/game.d.ts +0 -0
  48. /package/{dist → esm}/types/index.d.ts +0 -0
  49. /package/{dist → esm}/types/misc.d.ts +0 -0
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "pw-js-api",
3
- "version": "0.2.1",
3
+ "version": "0.2.2-dev.8bac497",
4
4
  "description": "A PixelWalker Library, aims to be minimal with support for browsers.",
5
5
  "exports": {
6
- "bun": "./dist/index.js",
7
- "import": "./esm.mjs",
8
- "require": "./dist/index.js",
9
- "types": "./dist/index.d.ts"
6
+ "types": "./esm/index.js",
7
+ "import": "./esm/index.js",
8
+ "require": "./cm/index.js"
10
9
  },
11
10
  "keywords": [
12
11
  "PixelWalker",
@@ -38,7 +37,7 @@
38
37
  },
39
38
  "scripts": {
40
39
  "test": "bun test/index.ts",
41
- "build": "rimraf dist && tsc -p tsconfig.json && ncp lib/types dist/types",
40
+ "build": "rimraf esm cm && tsc -p tsconfig-cm.json & tsc -p tsconfig-esm.json && ncp lib/types esm/types",
42
41
  "build:proto": "node scripts/build-proto.mjs && buf generate",
43
42
  "build:mappings": "node scripts/build-mappings.mjs",
44
43
  "browsify": "rimraf browser && npm-run-all -p browsify-*",
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "./tsconfig",
3
+ "compilerOptions": {
4
+ "outDir": "cm",
5
+ "module": "CommonJS",
6
+ "moduleResolution": "node",
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "./tsconfig",
3
+ "compilerOptions": {
4
+ "outDir": "esm",
5
+ "module": "ES6",
6
+ "moduleResolution": "bundler",
7
+ }
8
+ }
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "https://raw.githubusercontent.com/favware/npm-deprecate/main/assets/npm-deprecate.schema.json",
3
- "name": "*dev*",
4
- "deprecateDistTag": false,
5
- "verbose": true,
6
- "package": [
7
- "pw-js-api"
8
- ],
9
- "message": "This version has been deprecated. Please use a newer version."
10
- }
package/buf.gen.yaml DELETED
@@ -1,12 +0,0 @@
1
- version: v2
2
- managed:
3
- enabled: true
4
- plugins:
5
- # This will invoke protoc-gen-es and write output to src/gen
6
- - local: protoc-gen-es
7
- out: lib/gen
8
- opt:
9
- # Add more plugin options here
10
- - target=ts
11
- inputs:
12
- - directory: input
package/esm.mjs DELETED
@@ -1,18 +0,0 @@
1
- let PWGameClient = (await import("./dist/game/PWGameClient.js")).default;
2
- let PWApiClient = (await import("./dist/api/PWApiClient.js")).default;
3
-
4
- if ("default" in PWGameClient) PWGameClient = PWGameClient.default;
5
- if ("default" in PWApiClient) PWApiClient = PWApiClient.default;
6
-
7
- const Constants = (await import("./dist/util/Constants.js")).default;
8
- const BlockNames = (await import("./dist/util/block.js")).BlockNames;
9
- const ProtoGen = (await import("./dist/gen/world_pb.js")).default;
10
-
11
-
12
- export default {
13
- PWGameClient, PWApiClient, Constants, BlockNames, ProtoGen
14
- };
15
-
16
- export {
17
- PWGameClient, PWApiClient, Constants, BlockNames, ProtoGen
18
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes