@openmeter/sdk 1.0.0-beta-e2a40fb943d8 → 1.0.0-beta-f0abf4e71ce0
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/Makefile
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
|
|
2
|
+
|
|
3
|
+
.PHONY: generate
|
|
4
|
+
generate: ## Generate JavaScript SDK
|
|
5
|
+
$(call print-target)
|
|
6
|
+
pnpm --frozen-lockfile install
|
|
7
|
+
pnpm run generate
|
|
8
|
+
pnpm build
|
|
9
|
+
pnpm test
|
|
10
|
+
|
|
11
|
+
# Warning: keep in sync with .dagger/release.go for now
|
|
12
|
+
.PHONY: publish-javascript-sdk
|
|
13
|
+
publish-javascript-sdk: ## Publish JavaScript SDK
|
|
14
|
+
$(call print-target)
|
|
15
|
+
@if [ -z "$$JS_SDK_RELEASE_VERSION" ]; then \
|
|
16
|
+
echo "ERROR: JS_SDK_RELEASE_VERSION is required"; \
|
|
17
|
+
echo "Usage: JS_SDK_RELEASE_VERSION=1.2.3 NPM_TOKEN=xxxx make publish-js-sdk [JS_SDK_RELEASE_TAG=beta]"; \
|
|
18
|
+
exit 1; \
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
@if [ -z "$$JS_SDK_RELEASE_TAG" ]; then \
|
|
22
|
+
echo "ERROR: JS_SDK_RELEASE_TAG is required"; \
|
|
23
|
+
echo "Usage: JS_SDK_RELEASE_VERSION=1.2.3 NPM_TOKEN=xxxx make publish-js-sdk [JS_SDK_RELEASE_TAG=beta]"; \
|
|
24
|
+
exit 1; \
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
pnpm --frozen-lockfile install
|
|
28
|
+
pnpm version $${JS_SDK_RELEASE_VERSION} --no-git-tag-version
|
|
29
|
+
CACHE_BUSTER=$$(date --rfc-3339=seconds) pnpm publish --no-git-checks --tag $${JS_SDK_RELEASE_TAG}
|
|
30
|
+
@echo "✅ Published $${JS_SDK_RELEASE_TAG} JavaScript SDK version $${JS_SDK_RELEASE_VERSION} with tag $${JS_SDK_RELEASE_TAG}"
|
|
31
|
+
|
|
32
|
+
.PHONY: help
|
|
33
|
+
.DEFAULT_GOAL := help
|
|
34
|
+
help:
|
|
35
|
+
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
36
|
+
|
|
37
|
+
# Variable outputting/exporting rules
|
|
38
|
+
var-%: ; @echo $($*)
|
|
39
|
+
varexport-%: ; @echo $*=$($*)
|
|
40
|
+
|
|
41
|
+
define print-target
|
|
42
|
+
@printf "Executing target: \033[36m$@\033[0m\n"
|
|
43
|
+
endef
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|