@greenpandastudios/aug-cli 0.19.0
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/LICENSE +21 -0
- package/README.md +13 -0
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/bin/aug.mjs +3 -0
- package/docs/api/crypto.md +351 -0
- package/docs/api/io.md +207 -0
- package/docs/api/json.md +21 -0
- package/docs/api/memory.md +109 -0
- package/docs/api/time.md +54 -0
- package/docs/api/web.md +184 -0
- package/docs/assets/benchmarks/execution.svg +2978 -0
- package/docs/assets/benchmarks/http.svg +1674 -0
- package/docs/assets/benchmarks/improvements.svg +2315 -0
- package/docs/assets/benchmarks/memory.svg +1891 -0
- package/docs/benchmark-baseline.json +1087 -0
- package/docs/benchmark-results.json +91123 -0
- package/docs/benchmarks.json +38 -0
- package/docs/compatibility.md +42 -0
- package/docs/concurrency-implementation.md +18 -0
- package/docs/diagnostics.md +97 -0
- package/docs/docker.md +35 -0
- package/docs/example-projects.json +26 -0
- package/docs/examples/approved-design/counters.md +253 -0
- package/docs/examples/approved-design/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/approved-design/domain/app.md +165 -0
- package/docs/examples/approved-design/domain/export.md +83 -0
- package/docs/examples/approved-design/domain/models.md +80 -0
- package/docs/examples/approved-design/domain/numbers.md +248 -0
- package/docs/examples/approved-design/index.md +39 -0
- package/docs/examples/approved-design/main-yaml.md +24 -0
- package/docs/examples/approved-design/main.md +215 -0
- package/docs/examples/benchmark/index.md +33 -0
- package/docs/examples/benchmark/main-yaml.md +17 -0
- package/docs/examples/benchmark/main.md +117 -0
- package/docs/examples/cli-args/index.md +32 -0
- package/docs/examples/cli-args/main.md +107 -0
- package/docs/examples/collections/index.md +32 -0
- package/docs/examples/collections/main.md +118 -0
- package/docs/examples/collections-benchmark/index.md +34 -0
- package/docs/examples/collections-benchmark/main.md +115 -0
- package/docs/examples/cpu-benchmark/index.md +34 -0
- package/docs/examples/cpu-benchmark/main.md +90 -0
- package/docs/examples/developer-workflow/calculator.md +357 -0
- package/docs/examples/developer-workflow/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/developer-workflow/index.md +37 -0
- package/docs/examples/developer-workflow/logging/console.md +124 -0
- package/docs/examples/developer-workflow/logging/export.md +70 -0
- package/docs/examples/developer-workflow/logging/logger.md +111 -0
- package/docs/examples/developer-workflow/main.md +172 -0
- package/docs/examples/drop/index.md +33 -0
- package/docs/examples/drop/main.md +85 -0
- package/docs/examples/drop/resource.md +95 -0
- package/docs/examples/errors/errors.md +85 -0
- package/docs/examples/errors/index.md +33 -0
- package/docs/examples/errors/main.md +92 -0
- package/docs/examples/ffi/index.md +33 -0
- package/docs/examples/ffi/main.md +75 -0
- package/docs/examples/ffi/native.md +93 -0
- package/docs/examples/generic-di/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/generic-di/index.md +33 -0
- package/docs/examples/generic-di/main.md +111 -0
- package/docs/examples/generic-di/types.md +180 -0
- package/docs/examples/generics/index.md +33 -0
- package/docs/examples/generics/main.md +120 -0
- package/docs/examples/generics/types.md +189 -0
- package/docs/examples/hello/app/export.md +67 -0
- package/docs/examples/hello/app/greeter.md +190 -0
- package/docs/examples/hello/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/hello/index.md +37 -0
- package/docs/examples/hello/logging/console.md +121 -0
- package/docs/examples/hello/logging/export.md +71 -0
- package/docs/examples/hello/logging/logger.md +120 -0
- package/docs/examples/hello/main.md +115 -0
- package/docs/examples/http-benchmark/index.md +35 -0
- package/docs/examples/http-benchmark/main.md +79 -0
- package/docs/examples/http-benchmark/routes.md +88 -0
- package/docs/examples/index.md +60 -0
- package/docs/examples/interceptors/app.md +250 -0
- package/docs/examples/interceptors/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/interceptors/index.md +35 -0
- package/docs/examples/interceptors/interceptors.md +284 -0
- package/docs/examples/interceptors/logging.md +155 -0
- package/docs/examples/interceptors/main.md +162 -0
- package/docs/examples/json-benchmark/data.md +71 -0
- package/docs/examples/json-benchmark/dependencies/august/0.19.0/json/contracts.md +103 -0
- package/docs/examples/json-benchmark/index.md +35 -0
- package/docs/examples/json-benchmark/main.md +131 -0
- package/docs/examples/new-syntax/console.md +118 -0
- package/docs/examples/new-syntax/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/new-syntax/greeter.md +145 -0
- package/docs/examples/new-syntax/index.md +36 -0
- package/docs/examples/new-syntax/logger.md +111 -0
- package/docs/examples/new-syntax/main.md +135 -0
- package/docs/examples/new-syntax/math.md +79 -0
- package/docs/examples/oidc-login/client/contracts.md +151 -0
- package/docs/examples/oidc-login/client/endpoints.md +263 -0
- package/docs/examples/oidc-login/client/export.md +107 -0
- package/docs/examples/oidc-login/client/login.md +515 -0
- package/docs/examples/oidc-login/client/logout.md +249 -0
- package/docs/examples/oidc-login/client/protocol.md +595 -0
- package/docs/examples/oidc-login/client/session.md +297 -0
- package/docs/examples/oidc-login/client/views.md +144 -0
- package/docs/examples/oidc-login/common/export.md +115 -0
- package/docs/examples/oidc-login/common/headers.md +162 -0
- package/docs/examples/oidc-login/common/keys.md +336 -0
- package/docs/examples/oidc-login/common/settings.md +116 -0
- package/docs/examples/oidc-login/common/views.md +103 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/crypto/contracts.md +925 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/crypto/jose.md +434 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/json/contracts.md +103 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/memory/store.md +374 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/time/contracts.md +150 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/web/contracts.md +532 -0
- package/docs/examples/oidc-login/index.md +57 -0
- package/docs/examples/oidc-login/main-yaml.md +28 -0
- package/docs/examples/oidc-login/main.md +283 -0
- package/docs/examples/oidc-login/provider/authorization.md +457 -0
- package/docs/examples/oidc-login/provider/contracts.md +267 -0
- package/docs/examples/oidc-login/provider/credentials.md +148 -0
- package/docs/examples/oidc-login/provider/discovery.md +215 -0
- package/docs/examples/oidc-login/provider/export.md +131 -0
- package/docs/examples/oidc-login/provider/token.md +364 -0
- package/docs/examples/oidc-login/provider/userinfo.md +228 -0
- package/docs/examples/oidc-login/provider/views.md +137 -0
- package/docs/examples/ownership/counter.md +140 -0
- package/docs/examples/ownership/index.md +33 -0
- package/docs/examples/ownership/main.md +90 -0
- package/docs/examples/ownership-transfer/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/ownership-transfer/index.md +33 -0
- package/docs/examples/ownership-transfer/main.md +125 -0
- package/docs/examples/ownership-transfer/resource.md +150 -0
- package/docs/examples/packages-app/dependencies/packages/@example/aug-math/0.1.0/arithmetic.md +117 -0
- package/docs/examples/packages-app/index.md +34 -0
- package/docs/examples/packages-app/main-yaml.md +18 -0
- package/docs/examples/packages-app/main.md +80 -0
- package/docs/examples/packages-math/aug-package-json.md +24 -0
- package/docs/examples/packages-math/index.md +36 -0
- package/docs/examples/packages-math/package-json.md +25 -0
- package/docs/examples/packages-math/src/arithmetic.md +121 -0
- package/docs/examples/packages-math/src/export.md +63 -0
- package/docs/examples/startup-benchmark/index.md +34 -0
- package/docs/examples/startup-benchmark/main.md +68 -0
- package/docs/examples/visibility/counter.md +142 -0
- package/docs/examples/visibility/index.md +33 -0
- package/docs/examples/visibility/main.md +96 -0
- package/docs/examples.json +47 -0
- package/docs/getting-started.md +5 -0
- package/docs/grammar.md +136 -0
- package/docs/implementation-map.md +106 -0
- package/docs/index.md +46 -0
- package/docs/language-conformance.md +30 -0
- package/docs/language-constructs.md +1461 -0
- package/docs/language-design-audit.md +147 -0
- package/docs/maintaining-docs.md +43 -0
- package/docs/packages.md +184 -0
- package/docs/performance.md +535 -0
- package/docs/production-readiness.md +39 -0
- package/docs/reference.md +361 -0
- package/docs/release-review.md +23 -0
- package/docs/releasing.md +79 -0
- package/docs/roadmap.md +13 -0
- package/docs/specifications.md +86 -0
- package/docs/testing.md +120 -0
- package/docs/tooling.md +197 -0
- package/docs/web-implementation-plan.md +39 -0
- package/docs/web-library-gaps.md +27 -0
- package/docs/web.md +197 -0
- package/examples/approved-design/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/approved-design/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/approved-design/.aug-spec/manifest.json +14 -0
- package/examples/approved-design/counters.aug +22 -0
- package/examples/approved-design/counters.aug.md +177 -0
- package/examples/approved-design/domain/app.aug +12 -0
- package/examples/approved-design/domain/app.aug.md +97 -0
- package/examples/approved-design/domain/export.aug +5 -0
- package/examples/approved-design/domain/export.aug.md +25 -0
- package/examples/approved-design/domain/models.aug +2 -0
- package/examples/approved-design/domain/models.aug.md +30 -0
- package/examples/approved-design/domain/numbers.aug +29 -0
- package/examples/approved-design/domain/numbers.aug.md +141 -0
- package/examples/approved-design/main.aug +26 -0
- package/examples/approved-design/main.aug.md +108 -0
- package/examples/approved-design/main.yaml +8 -0
- package/examples/benchmark/.aug-spec/manifest.json +7 -0
- package/examples/benchmark/main.aug +17 -0
- package/examples/benchmark/main.aug.md +43 -0
- package/examples/benchmark/main.yaml +1 -0
- package/examples/cli-args/.aug-spec/manifest.json +7 -0
- package/examples/cli-args/main.aug +15 -0
- package/examples/cli-args/main.aug.md +38 -0
- package/examples/collections/.aug-spec/manifest.json +7 -0
- package/examples/collections/main.aug +18 -0
- package/examples/collections/main.aug.md +43 -0
- package/examples/developer-workflow/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/developer-workflow/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/developer-workflow/.aug-spec/manifest.json +13 -0
- package/examples/developer-workflow/calculator.aug +55 -0
- package/examples/developer-workflow/calculator.aug.md +228 -0
- package/examples/developer-workflow/logging/console.aug +8 -0
- package/examples/developer-workflow/logging/console.aug.md +67 -0
- package/examples/developer-workflow/logging/export.aug +2 -0
- package/examples/developer-workflow/logging/export.aug.md +19 -0
- package/examples/developer-workflow/logging/logger.aug +6 -0
- package/examples/developer-workflow/logging/logger.aug.md +57 -0
- package/examples/developer-workflow/main.aug +25 -0
- package/examples/developer-workflow/main.aug.md +79 -0
- package/examples/drop/.aug-spec/manifest.json +8 -0
- package/examples/drop/main.aug +3 -0
- package/examples/drop/main.aug.md +35 -0
- package/examples/drop/resource.aug +8 -0
- package/examples/drop/resource.aug.md +44 -0
- package/examples/errors/.aug-spec/manifest.json +8 -0
- package/examples/errors/errors.aug +6 -0
- package/examples/errors/errors.aug.md +33 -0
- package/examples/errors/main.aug +7 -0
- package/examples/errors/main.aug.md +36 -0
- package/examples/ffi/.aug-spec/manifest.json +8 -0
- package/examples/ffi/main.aug +2 -0
- package/examples/ffi/main.aug.md +27 -0
- package/examples/ffi/native.aug +6 -0
- package/examples/ffi/native.aug.md +43 -0
- package/examples/generic-di/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/generic-di/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/generic-di/.aug-spec/manifest.json +10 -0
- package/examples/generic-di/main.aug +9 -0
- package/examples/generic-di/main.aug.md +49 -0
- package/examples/generic-di/types.aug +17 -0
- package/examples/generic-di/types.aug.md +124 -0
- package/examples/generics/.aug-spec/manifest.json +8 -0
- package/examples/generics/main.aug +9 -0
- package/examples/generics/main.aug.md +58 -0
- package/examples/generics/types.aug +19 -0
- package/examples/generics/types.aug.md +132 -0
- package/examples/hello/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/hello/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/hello/.aug-spec/manifest.json +14 -0
- package/examples/hello/app/export.aug +1 -0
- package/examples/hello/app/export.aug.md +17 -0
- package/examples/hello/app/greeter.aug +22 -0
- package/examples/hello/app/greeter.aug.md +109 -0
- package/examples/hello/logging/console.aug +7 -0
- package/examples/hello/logging/console.aug.md +65 -0
- package/examples/hello/logging/export.aug +2 -0
- package/examples/hello/logging/export.aug.md +19 -0
- package/examples/hello/logging/logger.aug +9 -0
- package/examples/hello/logging/logger.aug.md +59 -0
- package/examples/hello/main.aug +9 -0
- package/examples/hello/main.aug.md +49 -0
- package/examples/interceptors/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/interceptors/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/interceptors/.aug-spec/manifest.json +12 -0
- package/examples/interceptors/app.aug +28 -0
- package/examples/interceptors/app.aug.md +162 -0
- package/examples/interceptors/interceptors.aug +40 -0
- package/examples/interceptors/interceptors.aug.md +180 -0
- package/examples/interceptors/logging.aug +12 -0
- package/examples/interceptors/logging.aug.md +96 -0
- package/examples/interceptors/main.aug +22 -0
- package/examples/interceptors/main.aug.md +76 -0
- package/examples/new-syntax/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/new-syntax/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/new-syntax/.aug-spec/manifest.json +13 -0
- package/examples/new-syntax/console.aug +7 -0
- package/examples/new-syntax/console.aug.md +63 -0
- package/examples/new-syntax/greeter.aug +10 -0
- package/examples/new-syntax/greeter.aug.md +89 -0
- package/examples/new-syntax/logger.aug +6 -0
- package/examples/new-syntax/logger.aug.md +57 -0
- package/examples/new-syntax/main.aug +12 -0
- package/examples/new-syntax/main.aug.md +64 -0
- package/examples/new-syntax/math.aug +3 -0
- package/examples/new-syntax/math.aug.md +29 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/contracts.aug +73 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/contracts.aug.md +791 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/jose.aug +68 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/jose.aug.md +266 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/json/contracts.aug +6 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/json/contracts.aug.md +55 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/memory/store.aug +45 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/memory/store.aug.md +250 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/time/contracts.aug +11 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/time/contracts.aug.md +96 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/web/contracts.aug +58 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/web/contracts.aug.md +420 -0
- package/examples/oidc-login/.aug-spec/manifest.json +40 -0
- package/examples/oidc-login/README.md +29 -0
- package/examples/oidc-login/client/contracts.aug +7 -0
- package/examples/oidc-login/client/contracts.aug.md +80 -0
- package/examples/oidc-login/client/endpoints.aug +21 -0
- package/examples/oidc-login/client/endpoints.aug.md +161 -0
- package/examples/oidc-login/client/export.aug +7 -0
- package/examples/oidc-login/client/export.aug.md +29 -0
- package/examples/oidc-login/client/login.aug +58 -0
- package/examples/oidc-login/client/login.aug.md +331 -0
- package/examples/oidc-login/client/logout.aug +18 -0
- package/examples/oidc-login/client/logout.aug.md +150 -0
- package/examples/oidc-login/client/protocol.aug +106 -0
- package/examples/oidc-login/client/protocol.aug.md +326 -0
- package/examples/oidc-login/client/session.aug +34 -0
- package/examples/oidc-login/client/session.aug.md +155 -0
- package/examples/oidc-login/client/views.aug +21 -0
- package/examples/oidc-login/client/views.aug.md +68 -0
- package/examples/oidc-login/common/export.aug +9 -0
- package/examples/oidc-login/common/export.aug.md +33 -0
- package/examples/oidc-login/common/headers.aug +11 -0
- package/examples/oidc-login/common/headers.aug.md +79 -0
- package/examples/oidc-login/common/keys.aug +37 -0
- package/examples/oidc-login/common/keys.aug.md +207 -0
- package/examples/oidc-login/common/settings.aug +4 -0
- package/examples/oidc-login/common/settings.aug.md +47 -0
- package/examples/oidc-login/common/views.aug +16 -0
- package/examples/oidc-login/common/views.aug.md +34 -0
- package/examples/oidc-login/main.aug +39 -0
- package/examples/oidc-login/main.aug.md +166 -0
- package/examples/oidc-login/main.yaml +12 -0
- package/examples/oidc-login/provider/authorization.aug +59 -0
- package/examples/oidc-login/provider/authorization.aug.md +264 -0
- package/examples/oidc-login/provider/contracts.aug +15 -0
- package/examples/oidc-login/provider/contracts.aug.md +193 -0
- package/examples/oidc-login/provider/credentials.aug +10 -0
- package/examples/oidc-login/provider/credentials.aug.md +64 -0
- package/examples/oidc-login/provider/discovery.aug +13 -0
- package/examples/oidc-login/provider/discovery.aug.md +133 -0
- package/examples/oidc-login/provider/export.aug +13 -0
- package/examples/oidc-login/provider/export.aug.md +41 -0
- package/examples/oidc-login/provider/token.aug +37 -0
- package/examples/oidc-login/provider/token.aug.md +223 -0
- package/examples/oidc-login/provider/userinfo.aug +26 -0
- package/examples/oidc-login/provider/userinfo.aug.md +104 -0
- package/examples/oidc-login/provider/views.aug +18 -0
- package/examples/oidc-login/provider/views.aug.md +63 -0
- package/examples/ownership/.aug-spec/manifest.json +8 -0
- package/examples/ownership/counter.aug +14 -0
- package/examples/ownership/counter.aug.md +85 -0
- package/examples/ownership/main.aug +4 -0
- package/examples/ownership/main.aug.md +38 -0
- package/examples/ownership-transfer/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/ownership-transfer/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/ownership-transfer/.aug-spec/manifest.json +10 -0
- package/examples/ownership-transfer/main.aug +9 -0
- package/examples/ownership-transfer/main.aug.md +63 -0
- package/examples/ownership-transfer/resource.aug +16 -0
- package/examples/ownership-transfer/resource.aug.md +89 -0
- package/examples/packages/README.md +15 -0
- package/examples/packages/app/.aug-spec/manifest.json +9 -0
- package/examples/packages/app/.aug-spec/packages/@example/aug-math/0.1.0/arithmetic.aug +9 -0
- package/examples/packages/app/.aug-spec/packages/@example/aug-math/0.1.0/arithmetic.aug.md +63 -0
- package/examples/packages/app/main.aug +2 -0
- package/examples/packages/app/main.aug.md +33 -0
- package/examples/packages/app/main.yaml +2 -0
- package/examples/packages/math/.aug-spec/manifest.json +8 -0
- package/examples/packages/math/README.md +3 -0
- package/examples/packages/math/aug-package.json +8 -0
- package/examples/packages/math/package.json +9 -0
- package/examples/packages/math/src/arithmetic.aug +8 -0
- package/examples/packages/math/src/arithmetic.aug.md +63 -0
- package/examples/packages/math/src/export.aug +1 -0
- package/examples/packages/math/src/export.aug.md +17 -0
- package/examples/visibility/.aug-spec/manifest.json +8 -0
- package/examples/visibility/counter.aug +14 -0
- package/examples/visibility/counter.aug.md +87 -0
- package/examples/visibility/main.aug +7 -0
- package/examples/visibility/main.aug.md +39 -0
- package/package.json +50 -0
- package/runtime/aug_crypto.c +121 -0
- package/runtime/aug_html.c +93 -0
- package/runtime/aug_http.c +829 -0
- package/runtime/aug_json.c +165 -0
- package/runtime/aug_runtime.c +792 -0
- package/runtime/aug_runtime.h +245 -0
- package/runtime/aug_tasks.c +172 -0
- package/runtime/aug_time.c +5 -0
- package/runtime/aug_values.c +80 -0
- package/scripts/bootstrap-native.mjs +121 -0
- package/scripts/native-dependencies.lock.json +65 -0
- package/scripts/native-home.mjs +11 -0
- package/src/actions.js +109 -0
- package/src/ast.js +19 -0
- package/src/builtins.js +93 -0
- package/src/checker.js +2896 -0
- package/src/cli.js +344 -0
- package/src/codegen.js +1159 -0
- package/src/config.js +149 -0
- package/src/continuation.js +110 -0
- package/src/di.js +24 -0
- package/src/documentation.js +27 -0
- package/src/editor.js +782 -0
- package/src/effects.js +29 -0
- package/src/fixes.js +222 -0
- package/src/formatter.js +296 -0
- package/src/freshness.js +154 -0
- package/src/help.js +212 -0
- package/src/html.js +27 -0
- package/src/http-policies.js +90 -0
- package/src/inference.js +16 -0
- package/src/interceptors.js +70 -0
- package/src/javadoc.js +67 -0
- package/src/lexer.js +199 -0
- package/src/libraries.js +31 -0
- package/src/lsp.js +180 -0
- package/src/native.js +144 -0
- package/src/navigation.js +162 -0
- package/src/openapi.js +220 -0
- package/src/ownership.js +232 -0
- package/src/package-manager.js +299 -0
- package/src/parser.js +1155 -0
- package/src/policies.js +130 -0
- package/src/project-init.js +19 -0
- package/src/project.js +292 -0
- package/src/schemas.js +62 -0
- package/src/semantic.js +255 -0
- package/src/spec.js +738 -0
- package/src/testing.js +186 -0
- package/src/types.js +10 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "main.aug · Generic dependency injection"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/generic-di/main.aug"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
pageClass: aug-example-page
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# `main.aug`
|
|
13
|
+
|
|
14
|
+
[Generic dependency injection](index.md) · Source and specification
|
|
15
|
+
|
|
16
|
+
::: details Files in this project
|
|
17
|
+
|
|
18
|
+
- [`main.aug`](main.md)
|
|
19
|
+
- [`types.aug`](types.md)
|
|
20
|
+
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
::::: example-compare
|
|
24
|
+
|
|
25
|
+
:::: example-code
|
|
26
|
+
|
|
27
|
+
## Code {#code}
|
|
28
|
+
|
|
29
|
+
::: code-group
|
|
30
|
+
|
|
31
|
+
```aug [Indentation]
|
|
32
|
+
import Console and SystemConsole from august.io
|
|
33
|
+
implement Console with SystemConsole
|
|
34
|
+
import Repository from types
|
|
35
|
+
import NumberRepository from types
|
|
36
|
+
import Program from types
|
|
37
|
+
implement Repository<int> with NumberRepository
|
|
38
|
+
implement app with Program
|
|
39
|
+
resolve app to program
|
|
40
|
+
program.start()
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```aug [Braces]
|
|
44
|
+
import Console and SystemConsole from august.io
|
|
45
|
+
implement Console with SystemConsole
|
|
46
|
+
import Repository from types
|
|
47
|
+
import NumberRepository from types
|
|
48
|
+
import Program from types
|
|
49
|
+
implement Repository<int> with NumberRepository
|
|
50
|
+
implement app with Program
|
|
51
|
+
resolve app to program
|
|
52
|
+
program.start()
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
:::
|
|
56
|
+
|
|
57
|
+
::::
|
|
58
|
+
|
|
59
|
+
:::: example-spec
|
|
60
|
+
|
|
61
|
+
## Compiled specification {#specification}
|
|
62
|
+
|
|
63
|
+
August 0.19.0. This document is compiled from checked code with deterministic wording guided by Simplified Technical English.
|
|
64
|
+
|
|
65
|
+
### In this file
|
|
66
|
+
|
|
67
|
+
- Register 3 dependency providers before startup.
|
|
68
|
+
- Run 2 other startup steps in source order.
|
|
69
|
+
|
|
70
|
+
### Dependency providers
|
|
71
|
+
|
|
72
|
+
Register these providers before startup. Their declaration order does not set initialization order; shared instances initialize in dependency order.
|
|
73
|
+
|
|
74
|
+
- Provide [`SystemConsole`](dependencies/august/0.19.0/io/contracts.md#symbol-SystemConsole) when `Console` is requested. Reuse one instance.
|
|
75
|
+
- Provide [`NumberRepository`](types.md#symbol-NumberRepository) when `Repository<int>` is requested. Reuse one instance.
|
|
76
|
+
- Provide [`Program`](types.md#symbol-Program) when `app` is requested. Reuse one instance. Required dependencies: `Repository<int>`.
|
|
77
|
+
|
|
78
|
+
### Startup, in source order
|
|
79
|
+
|
|
80
|
+
- Set `program` to the instance provided for `app`.
|
|
81
|
+
- Call [`Program.start`](types.md#symbol-Program.start) on `program`; inject `console` from `Console`.
|
|
82
|
+
|
|
83
|
+
### Dependencies used by this file
|
|
84
|
+
|
|
85
|
+
Only referenced types and operations appear here. Each name links to its complete specification.
|
|
86
|
+
|
|
87
|
+
#### [`SystemConsole`](dependencies/august/0.19.0/io/contracts.md#symbol-SystemConsole)
|
|
88
|
+
|
|
89
|
+
Class from `august.io`.
|
|
90
|
+
|
|
91
|
+
Used as a type or provider.
|
|
92
|
+
|
|
93
|
+
#### [`NumberRepository`](types.md#symbol-NumberRepository)
|
|
94
|
+
|
|
95
|
+
Class from `types`.
|
|
96
|
+
|
|
97
|
+
Used as a type or provider.
|
|
98
|
+
|
|
99
|
+
#### [`Program`](types.md#symbol-Program)
|
|
100
|
+
|
|
101
|
+
Class from `types`.
|
|
102
|
+
|
|
103
|
+
- [`Program.start`](types.md#symbol-Program.start) (no caller inputs) → `void`; inject `console`: [`Console`](dependencies/august/0.19.0/io/contracts.md#symbol-Console); uses [`Console.write`](dependencies/august/0.19.0/io/contracts.md#symbol-Console.write).
|
|
104
|
+
|
|
105
|
+
### Shared language rules
|
|
106
|
+
|
|
107
|
+
See the [language reference](https://greenpandastudios.github.io/augscript/reference) for numeric, equality, ownership, and task rules.
|
|
108
|
+
|
|
109
|
+
::::
|
|
110
|
+
|
|
111
|
+
:::::
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "types.aug · Generic dependency injection"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/generic-di/types.aug"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
pageClass: aug-example-page
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# `types.aug`
|
|
13
|
+
|
|
14
|
+
[Generic dependency injection](index.md) · Source and specification
|
|
15
|
+
|
|
16
|
+
::: details Files in this project
|
|
17
|
+
|
|
18
|
+
- [`main.aug`](main.md)
|
|
19
|
+
- [`types.aug`](types.md)
|
|
20
|
+
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
::::: example-compare
|
|
24
|
+
|
|
25
|
+
:::: example-code
|
|
26
|
+
|
|
27
|
+
## Code {#code}
|
|
28
|
+
|
|
29
|
+
::: code-group
|
|
30
|
+
|
|
31
|
+
```aug [Indentation]
|
|
32
|
+
import Console from august.io
|
|
33
|
+
interface Repository<T>:
|
|
34
|
+
get() returns T
|
|
35
|
+
NumberRepository() implements Repository<int>:
|
|
36
|
+
get() returns int:
|
|
37
|
+
return 7
|
|
38
|
+
Program(resolve Repository<int> repository) implements IProgram:
|
|
39
|
+
start(resolve Console console) uses Console.write:
|
|
40
|
+
console.write(value=repository.get())
|
|
41
|
+
interface IProgram:
|
|
42
|
+
start(resolve Console console) uses Console.write
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```aug [Braces]
|
|
46
|
+
import Console from august.io
|
|
47
|
+
interface Repository<T> {
|
|
48
|
+
get() returns T
|
|
49
|
+
}
|
|
50
|
+
NumberRepository() implements Repository<int> {
|
|
51
|
+
get() returns int {
|
|
52
|
+
return 7
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
Program(resolve Repository<int> repository) implements IProgram {
|
|
56
|
+
start(resolve Console console) uses Console.write {
|
|
57
|
+
console.write(value=repository.get())
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
interface IProgram {
|
|
61
|
+
start(resolve Console console) uses Console.write
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
:::
|
|
66
|
+
|
|
67
|
+
::::
|
|
68
|
+
|
|
69
|
+
:::: example-spec
|
|
70
|
+
|
|
71
|
+
## Compiled specification {#specification}
|
|
72
|
+
|
|
73
|
+
August 0.19.0. This document is compiled from checked code with deterministic wording guided by Simplified Technical English.
|
|
74
|
+
|
|
75
|
+
### In this file
|
|
76
|
+
|
|
77
|
+
- [`Repository`](types.md#symbol-Repository) is an interface.
|
|
78
|
+
- [`NumberRepository`](types.md#symbol-NumberRepository) is a class implementing `Repository<int>`.
|
|
79
|
+
- [`Program`](types.md#symbol-Program) is a class implementing `IProgram`.
|
|
80
|
+
- [`IProgram`](types.md#symbol-IProgram) is an interface.
|
|
81
|
+
|
|
82
|
+
### `Repository` {#symbol-Repository}
|
|
83
|
+
|
|
84
|
+
[source](types.md#code)
|
|
85
|
+
|
|
86
|
+
Interface.
|
|
87
|
+
|
|
88
|
+
Type parameters: `T`.
|
|
89
|
+
|
|
90
|
+
#### `Repository.get` {#symbol-Repository.get}
|
|
91
|
+
|
|
92
|
+
[source](types.md#code)
|
|
93
|
+
|
|
94
|
+
Returns: `T`.
|
|
95
|
+
|
|
96
|
+
Interface contract. A selected implementation supplies the behavior.
|
|
97
|
+
|
|
98
|
+
### `NumberRepository` {#symbol-NumberRepository}
|
|
99
|
+
|
|
100
|
+
[source](types.md#code)
|
|
101
|
+
|
|
102
|
+
Behavioral class.
|
|
103
|
+
|
|
104
|
+
Satisfies [`Repository`](types.md#symbol-Repository).
|
|
105
|
+
|
|
106
|
+
#### `NumberRepository.get` {#symbol-NumberRepository.get}
|
|
107
|
+
|
|
108
|
+
[source](types.md#code)
|
|
109
|
+
|
|
110
|
+
Returns: `int`.
|
|
111
|
+
|
|
112
|
+
**What it does**
|
|
113
|
+
|
|
114
|
+
- Return `7`.
|
|
115
|
+
|
|
116
|
+
### `Program` {#symbol-Program}
|
|
117
|
+
|
|
118
|
+
[source](types.md#code)
|
|
119
|
+
|
|
120
|
+
Behavioral class.
|
|
121
|
+
|
|
122
|
+
Satisfies [`IProgram`](types.md#symbol-IProgram).
|
|
123
|
+
|
|
124
|
+
**Inputs**
|
|
125
|
+
|
|
126
|
+
- `repository` ([`Repository<int>`](types.md#symbol-Repository)) — injected; callers omit it — stored as `repository` and read-only after initialization.
|
|
127
|
+
|
|
128
|
+
#### `Program.start` {#symbol-Program.start}
|
|
129
|
+
|
|
130
|
+
[source](types.md#code)
|
|
131
|
+
|
|
132
|
+
**Inputs**
|
|
133
|
+
|
|
134
|
+
- `console` ([`Console`](dependencies/august/0.19.0/io/contracts.md#symbol-Console)) — injected; callers omit it.
|
|
135
|
+
|
|
136
|
+
Returns: no value.
|
|
137
|
+
|
|
138
|
+
Capabilities: [`Console.write`](dependencies/august/0.19.0/io/contracts.md#symbol-Console.write).
|
|
139
|
+
|
|
140
|
+
**What it does**
|
|
141
|
+
|
|
142
|
+
- Call [`Console.write`](dependencies/august/0.19.0/io/contracts.md#symbol-Console.write) on `console` with `value` = call [`Repository.get`](types.md#symbol-Repository.get) on `repository`.
|
|
143
|
+
|
|
144
|
+
### `IProgram` {#symbol-IProgram}
|
|
145
|
+
|
|
146
|
+
[source](types.md#code)
|
|
147
|
+
|
|
148
|
+
Interface.
|
|
149
|
+
|
|
150
|
+
#### `IProgram.start` {#symbol-IProgram.start}
|
|
151
|
+
|
|
152
|
+
[source](types.md#code)
|
|
153
|
+
|
|
154
|
+
**Inputs**
|
|
155
|
+
|
|
156
|
+
- `console` ([`Console`](dependencies/august/0.19.0/io/contracts.md#symbol-Console)) — injected; callers omit it.
|
|
157
|
+
|
|
158
|
+
Returns: no value.
|
|
159
|
+
|
|
160
|
+
Capabilities: [`Console.write`](dependencies/august/0.19.0/io/contracts.md#symbol-Console.write).
|
|
161
|
+
|
|
162
|
+
Interface contract. A selected implementation supplies the behavior.
|
|
163
|
+
|
|
164
|
+
### Dependencies used by this file
|
|
165
|
+
|
|
166
|
+
Only referenced types and operations appear here. Each name links to its complete specification.
|
|
167
|
+
|
|
168
|
+
#### [`Console`](dependencies/august/0.19.0/io/contracts.md#symbol-Console)
|
|
169
|
+
|
|
170
|
+
Capability interface from `august.io`.
|
|
171
|
+
|
|
172
|
+
- [`Console.write`](dependencies/august/0.19.0/io/contracts.md#symbol-Console.write)<`T`> (`value`: `T`) → `void`.
|
|
173
|
+
|
|
174
|
+
### Shared language rules
|
|
175
|
+
|
|
176
|
+
See the [language reference](https://greenpandastudios.github.io/augscript/reference) for numeric, equality, ownership, and task rules.
|
|
177
|
+
|
|
178
|
+
::::
|
|
179
|
+
|
|
180
|
+
:::::
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Generic contracts"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/generics"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Generic contracts
|
|
12
|
+
|
|
13
|
+
Write reusable records, interfaces, classes, and functions with type parameters.
|
|
14
|
+
|
|
15
|
+
Read a file below to see its highlighted source and the Markdown produced by `aug spec`. Choose **Indentation** or **Braces** above the code. Both views describe the same checked program; your choice is kept when you open another file.
|
|
16
|
+
|
|
17
|
+
## Project files
|
|
18
|
+
|
|
19
|
+
- [`main.aug`](main.md)
|
|
20
|
+
- [`types.aug`](types.md)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Try this project
|
|
24
|
+
|
|
25
|
+
From a repository checkout with August installed:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
aug check examples/generics
|
|
29
|
+
aug spec examples/generics
|
|
30
|
+
aug run examples/generics
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[Browse all examples](../index.md)
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "main.aug · Generic contracts"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/generics/main.aug"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
pageClass: aug-example-page
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# `main.aug`
|
|
13
|
+
|
|
14
|
+
[Generic contracts](index.md) · Source and specification
|
|
15
|
+
|
|
16
|
+
::: details Files in this project
|
|
17
|
+
|
|
18
|
+
- [`main.aug`](main.md)
|
|
19
|
+
- [`types.aug`](types.md)
|
|
20
|
+
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
::::: example-compare
|
|
24
|
+
|
|
25
|
+
:::: example-code
|
|
26
|
+
|
|
27
|
+
## Code {#code}
|
|
28
|
+
|
|
29
|
+
::: code-group
|
|
30
|
+
|
|
31
|
+
```aug [Indentation]
|
|
32
|
+
import Formatter from types
|
|
33
|
+
import TextFormatter from types
|
|
34
|
+
import Box from types
|
|
35
|
+
implement Formatter with TextFormatter
|
|
36
|
+
resolve Formatter to formatter
|
|
37
|
+
print(value=formatter.title())
|
|
38
|
+
print(value=formatter.format<int>(value=42))
|
|
39
|
+
box = Box<string>(value="inside a generic box")
|
|
40
|
+
print(value=box.get())
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```aug [Braces]
|
|
44
|
+
import Formatter from types
|
|
45
|
+
import TextFormatter from types
|
|
46
|
+
import Box from types
|
|
47
|
+
implement Formatter with TextFormatter
|
|
48
|
+
resolve Formatter to formatter
|
|
49
|
+
print(value=formatter.title())
|
|
50
|
+
print(value=formatter.format<int>(value=42))
|
|
51
|
+
box = Box<string>(value="inside a generic box")
|
|
52
|
+
print(value=box.get())
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
:::
|
|
56
|
+
|
|
57
|
+
::::
|
|
58
|
+
|
|
59
|
+
:::: example-spec
|
|
60
|
+
|
|
61
|
+
## Compiled specification {#specification}
|
|
62
|
+
|
|
63
|
+
August 0.19.0. This document is compiled from checked code with deterministic wording guided by Simplified Technical English.
|
|
64
|
+
|
|
65
|
+
### In this file
|
|
66
|
+
|
|
67
|
+
- Register 1 dependency provider before startup.
|
|
68
|
+
- Run 5 other startup steps in source order.
|
|
69
|
+
|
|
70
|
+
### Dependency providers
|
|
71
|
+
|
|
72
|
+
Register these providers before startup. Their declaration order does not set initialization order; shared instances initialize in dependency order.
|
|
73
|
+
|
|
74
|
+
- Provide [`TextFormatter`](types.md#symbol-TextFormatter) when `Formatter` is requested. Reuse one instance.
|
|
75
|
+
|
|
76
|
+
### Startup, in source order
|
|
77
|
+
|
|
78
|
+
- Set `formatter` to the instance provided for `Formatter`.
|
|
79
|
+
- Call `print` with `value` = call [`Formatter.title`](types.md#symbol-Formatter.title) on `formatter`.
|
|
80
|
+
- Call `print` with `value` = call [`Formatter.format`](types.md#symbol-Formatter.format) on `formatter` with type arguments `int` with `value` = `42`.
|
|
81
|
+
- Set `box` to call [`Box`](types.md#symbol-Box) with type arguments `string` with `value` = `"inside a generic box"`.
|
|
82
|
+
- Call `print` with `value` = call [`Box.get`](types.md#symbol-Box.get) on `box`.
|
|
83
|
+
|
|
84
|
+
### Dependencies used by this file
|
|
85
|
+
|
|
86
|
+
Only referenced types and operations appear here. Each name links to its complete specification.
|
|
87
|
+
|
|
88
|
+
#### [`Box`](types.md#symbol-Box)
|
|
89
|
+
|
|
90
|
+
Class from `types`.
|
|
91
|
+
|
|
92
|
+
- Construct with `value`: `T` → [`Box`](types.md#symbol-Box).
|
|
93
|
+
- [`Box.get`](types.md#symbol-Box.get) (no caller inputs) → `T`.
|
|
94
|
+
|
|
95
|
+
#### [`Formatter`](types.md#symbol-Formatter)
|
|
96
|
+
|
|
97
|
+
Interface from `types`.
|
|
98
|
+
|
|
99
|
+
- [`Formatter.format`](types.md#symbol-Formatter.format)<`T`> (`value`: `T`) → `string`.
|
|
100
|
+
- [`Formatter.title`](types.md#symbol-Formatter.title) (no caller inputs) → `string`.
|
|
101
|
+
|
|
102
|
+
#### [`TextFormatter`](types.md#symbol-TextFormatter)
|
|
103
|
+
|
|
104
|
+
Class from `types`.
|
|
105
|
+
|
|
106
|
+
Used as a type or provider.
|
|
107
|
+
|
|
108
|
+
### Built-in operations used by this file
|
|
109
|
+
|
|
110
|
+
- `print` (`value`: `any`) → `void`: Composition and test output. Other callables receive Console and declare uses console.write.
|
|
111
|
+
|
|
112
|
+
[Full built-in reference](https://greenpandastudios.github.io/augscript/language-constructs).
|
|
113
|
+
|
|
114
|
+
### Shared language rules
|
|
115
|
+
|
|
116
|
+
See the [language reference](https://greenpandastudios.github.io/augscript/reference) for numeric, equality, ownership, and task rules.
|
|
117
|
+
|
|
118
|
+
::::
|
|
119
|
+
|
|
120
|
+
:::::
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "types.aug · Generic contracts"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/generics/types.aug"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
pageClass: aug-example-page
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# `types.aug`
|
|
13
|
+
|
|
14
|
+
[Generic contracts](index.md) · Source and specification
|
|
15
|
+
|
|
16
|
+
::: details Files in this project
|
|
17
|
+
|
|
18
|
+
- [`main.aug`](main.md)
|
|
19
|
+
- [`types.aug`](types.md)
|
|
20
|
+
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
::::: example-compare
|
|
24
|
+
|
|
25
|
+
:::: example-code
|
|
26
|
+
|
|
27
|
+
## Code {#code}
|
|
28
|
+
|
|
29
|
+
::: code-group
|
|
30
|
+
|
|
31
|
+
```aug [Indentation]
|
|
32
|
+
interface Formatter:
|
|
33
|
+
format<T>(T value) returns string
|
|
34
|
+
title() returns string:
|
|
35
|
+
return "formatted"
|
|
36
|
+
TextFormatter() implements Formatter:
|
|
37
|
+
format<T>(T value) returns string:
|
|
38
|
+
return "generic method called"
|
|
39
|
+
Box<T>(T value) implements IBox<T>:
|
|
40
|
+
get() returns T:
|
|
41
|
+
return value
|
|
42
|
+
interface IBox<T>:
|
|
43
|
+
get() returns T
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```aug [Braces]
|
|
47
|
+
interface Formatter {
|
|
48
|
+
format<T>(T value) returns string
|
|
49
|
+
title() returns string {
|
|
50
|
+
return "formatted"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
TextFormatter() implements Formatter {
|
|
54
|
+
format<T>(T value) returns string {
|
|
55
|
+
return "generic method called"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
Box<T>(T value) implements IBox<T> {
|
|
59
|
+
get() returns T {
|
|
60
|
+
return value
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
interface IBox<T> {
|
|
64
|
+
get() returns T
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
:::
|
|
69
|
+
|
|
70
|
+
::::
|
|
71
|
+
|
|
72
|
+
:::: example-spec
|
|
73
|
+
|
|
74
|
+
## Compiled specification {#specification}
|
|
75
|
+
|
|
76
|
+
August 0.19.0. This document is compiled from checked code with deterministic wording guided by Simplified Technical English.
|
|
77
|
+
|
|
78
|
+
### In this file
|
|
79
|
+
|
|
80
|
+
- [`Formatter`](types.md#symbol-Formatter) is an interface.
|
|
81
|
+
- [`TextFormatter`](types.md#symbol-TextFormatter) is a class implementing `Formatter`.
|
|
82
|
+
- [`Box`](types.md#symbol-Box) is a class implementing `IBox<T>`.
|
|
83
|
+
- [`IBox`](types.md#symbol-IBox) is an interface.
|
|
84
|
+
|
|
85
|
+
### `Formatter` {#symbol-Formatter}
|
|
86
|
+
|
|
87
|
+
[source](types.md#code)
|
|
88
|
+
|
|
89
|
+
Interface.
|
|
90
|
+
|
|
91
|
+
#### `Formatter.format` {#symbol-Formatter.format}
|
|
92
|
+
|
|
93
|
+
[source](types.md#code)
|
|
94
|
+
|
|
95
|
+
Type parameters: `T`.
|
|
96
|
+
|
|
97
|
+
**Inputs**
|
|
98
|
+
|
|
99
|
+
- `value` (`T`) — required labeled input.
|
|
100
|
+
|
|
101
|
+
Returns: `string`.
|
|
102
|
+
|
|
103
|
+
Interface contract. A selected implementation supplies the behavior.
|
|
104
|
+
|
|
105
|
+
#### `Formatter.title` {#symbol-Formatter.title}
|
|
106
|
+
|
|
107
|
+
[source](types.md#code)
|
|
108
|
+
|
|
109
|
+
Returns: `string`.
|
|
110
|
+
|
|
111
|
+
**What it does**
|
|
112
|
+
|
|
113
|
+
- Return `"formatted"`.
|
|
114
|
+
|
|
115
|
+
### `TextFormatter` {#symbol-TextFormatter}
|
|
116
|
+
|
|
117
|
+
[source](types.md#code)
|
|
118
|
+
|
|
119
|
+
Behavioral class.
|
|
120
|
+
|
|
121
|
+
Satisfies [`Formatter`](types.md#symbol-Formatter).
|
|
122
|
+
|
|
123
|
+
**Inherited default behavior**
|
|
124
|
+
|
|
125
|
+
- [`Formatter.title`](types.md#symbol-Formatter.title).
|
|
126
|
+
|
|
127
|
+
#### `TextFormatter.format` {#symbol-TextFormatter.format}
|
|
128
|
+
|
|
129
|
+
[source](types.md#code)
|
|
130
|
+
|
|
131
|
+
Type parameters: `T`.
|
|
132
|
+
|
|
133
|
+
**Inputs**
|
|
134
|
+
|
|
135
|
+
- `value` (`T`) — required labeled input.
|
|
136
|
+
|
|
137
|
+
Returns: `string`.
|
|
138
|
+
|
|
139
|
+
**What it does**
|
|
140
|
+
|
|
141
|
+
- Return `"generic method called"`.
|
|
142
|
+
|
|
143
|
+
### `Box` {#symbol-Box}
|
|
144
|
+
|
|
145
|
+
[source](types.md#code)
|
|
146
|
+
|
|
147
|
+
Behavioral class.
|
|
148
|
+
|
|
149
|
+
Type parameters: `T`.
|
|
150
|
+
|
|
151
|
+
Satisfies [`IBox`](types.md#symbol-IBox).
|
|
152
|
+
|
|
153
|
+
**Inputs**
|
|
154
|
+
|
|
155
|
+
- `value` (`T`) — required labeled input — stored as `value` and read-only after initialization.
|
|
156
|
+
|
|
157
|
+
#### `Box.get` {#symbol-Box.get}
|
|
158
|
+
|
|
159
|
+
[source](types.md#code)
|
|
160
|
+
|
|
161
|
+
Returns: `T`.
|
|
162
|
+
|
|
163
|
+
**What it does**
|
|
164
|
+
|
|
165
|
+
- Return `value`.
|
|
166
|
+
|
|
167
|
+
### `IBox` {#symbol-IBox}
|
|
168
|
+
|
|
169
|
+
[source](types.md#code)
|
|
170
|
+
|
|
171
|
+
Interface.
|
|
172
|
+
|
|
173
|
+
Type parameters: `T`.
|
|
174
|
+
|
|
175
|
+
#### `IBox.get` {#symbol-IBox.get}
|
|
176
|
+
|
|
177
|
+
[source](types.md#code)
|
|
178
|
+
|
|
179
|
+
Returns: `T`.
|
|
180
|
+
|
|
181
|
+
Interface contract. A selected implementation supplies the behavior.
|
|
182
|
+
|
|
183
|
+
### Shared language rules
|
|
184
|
+
|
|
185
|
+
See the [language reference](https://greenpandastudios.github.io/augscript/reference) for numeric, equality, ownership, and task rules.
|
|
186
|
+
|
|
187
|
+
::::
|
|
188
|
+
|
|
189
|
+
:::::
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "app/export.aug · Hello world with dependencies"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/hello/app/export.aug"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
pageClass: aug-example-page
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# `app/export.aug`
|
|
13
|
+
|
|
14
|
+
[Hello world with dependencies](../index.md) · Source and specification
|
|
15
|
+
|
|
16
|
+
::: details Files in this project
|
|
17
|
+
|
|
18
|
+
- [`main.aug`](../main.md)
|
|
19
|
+
- [`app/export.aug`](export.md)
|
|
20
|
+
- [`app/greeter.aug`](greeter.md)
|
|
21
|
+
- [`logging/console.aug`](../logging/console.md)
|
|
22
|
+
- [`logging/export.aug`](../logging/export.md)
|
|
23
|
+
- [`logging/logger.aug`](../logging/logger.md)
|
|
24
|
+
|
|
25
|
+
:::
|
|
26
|
+
|
|
27
|
+
::::: example-compare
|
|
28
|
+
|
|
29
|
+
:::: example-code
|
|
30
|
+
|
|
31
|
+
## Code {#code}
|
|
32
|
+
|
|
33
|
+
::: code-group
|
|
34
|
+
|
|
35
|
+
```aug [Indentation]
|
|
36
|
+
export Greeter from greeter
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```aug [Braces]
|
|
40
|
+
export Greeter from greeter
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
:::
|
|
44
|
+
|
|
45
|
+
::::
|
|
46
|
+
|
|
47
|
+
:::: example-spec
|
|
48
|
+
|
|
49
|
+
## Compiled specification {#specification}
|
|
50
|
+
|
|
51
|
+
August 0.19.0. This document is compiled from checked code with deterministic wording guided by Simplified Technical English.
|
|
52
|
+
|
|
53
|
+
### In this file
|
|
54
|
+
|
|
55
|
+
- Export `Greeter` from this folder.
|
|
56
|
+
|
|
57
|
+
### Folder exports
|
|
58
|
+
|
|
59
|
+
- Export the declaration `Greeter` from [`greeter.aug`](greeter.md#symbol-Greeter).
|
|
60
|
+
|
|
61
|
+
### Shared language rules
|
|
62
|
+
|
|
63
|
+
See the [language reference](https://greenpandastudios.github.io/augscript/reference) for numeric, equality, ownership, and task rules.
|
|
64
|
+
|
|
65
|
+
::::
|
|
66
|
+
|
|
67
|
+
:::::
|