Skip to content

Commit f91fd60

Browse files
authored
update spin v2 docs to point at sdk-v2 branch for JS (#1471)
Signed-off-by: karthik2804 <[email protected]>
1 parent e36b3e6 commit f91fd60

10 files changed

+14
-13
lines changed

content/spin/v2/ai-sentiment-analysis-api-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The above installation script automatically installs the latest SDKs for Rust (w
6060
<!-- @selectiveCpy -->
6161

6262
```bash
63-
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --upgrade
63+
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --upgrade --branch sdk-v2
6464
```
6565

6666
**Python**

content/spin/v2/http-outbound.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const response = await fetch("https://example.com/users");
102102

103103
**Notes**
104104

105-
You can find a complete example of using outbound HTTP in the JavaScript SDK repository on [GitHub](https://github.com/fermyon/spin-js-sdk/tree/main/examples/common-patterns/outbound-http)
105+
You can find a complete example of using outbound HTTP in the JavaScript SDK repository on [GitHub](https://github.com/fermyon/spin-js-sdk/tree/sdk-v2/examples/common-patterns/outbound-http)
106106

107107
**Note**: `fetch` currently only works when building for the HTTP trigger.
108108

content/spin/v2/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Spin JS SDK:
263263
<!-- @selectiveCpy -->
264264

265265
```bash
266-
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --upgrade
266+
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --upgrade --branch sdk-v2
267267
```
268268

269269
To list installed templates, run:

content/spin/v2/javascript-components.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ With JavaScript being a very popular language, Spin provides an SDK to support b
2929
> This guide assumes you are familiar with the JavaScript programming language,
3030
> but if you are just getting started, be sure to check [the MDN guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide).
3131
32-
> All examples from this page can be found in [the JavaScript SDK repository on GitHub](https://github.com/fermyon/spin-js-sdk/tree/main/examples).
32+
> All examples from this page can be found in [the JavaScript SDK repository on GitHub](https://github.com/fermyon/spin-js-sdk/tree/sdk-v2/examples).
3333
3434
[**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://fermyon.github.io/spin-js-sdk/)
3535

3636
## Installing Templates
3737

38-
The JavaScript/TypeScript templates can be installed from [spin-js-sdk repository](https://github.com/fermyon/spin-js-sdk/tree/main/) using the following command:
38+
The JavaScript/TypeScript templates can be installed from [spin-js-sdk repository](https://github.com/fermyon/spin-js-sdk/tree/sdk-v2/) using the following command:
3939

4040
<!-- @selectiveCpy -->
4141

4242
```bash
43-
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --update
43+
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --update --branch sdk-v2
4444
```
4545

4646
which will install the `http-js` and `http-ts` templates:
@@ -238,7 +238,7 @@ proxies or URL shorteners.
238238
## Storing Data in Redis From JS/TS Components
239239

240240
> You can find a complete example for using outbound Redis from an HTTP component
241-
> in the [spin-js-sdk repository on GitHub](https://github.com/fermyon/spin-js-sdk/blob/main/examples/spin-host-apis/spin-redis).
241+
> in the [spin-js-sdk repository on GitHub](https://github.com/fermyon/spin-js-sdk/blob/sdk-v2/examples/spin-host-apis/spin-redis).
242242
243243
Using the Spin's JS SDK, you can use the Redis key/value store and to publish messages to Redis channels.
244244

content/spin/v2/key-value-store-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ $ spin new -t http-rust spin-key-value
7676
```bash
7777
$ spin new -t http-ts spin-key-value
7878

79-
# Reference: https://github.com/fermyon/spin-js-sdk/tree/main/examples/spin-host-apis/spin-kv
79+
# Reference: https://github.com/fermyon/spin-js-sdk/tree/sdk-v2/examples/spin-host-apis/spin-kv
8080
```
8181

8282
{{ blockEnd }}

content/spin/v2/mqtt-outbound.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ connection.publish("pets", catPicture, QoS.AtleastOnce);
7474

7575
For full details of the MQTT API, see the [Spin SDK reference documentation](https://fermyon.github.io/spin-js-sdk/modules/Mqtt.html)
7676

77-
You can find a complete Rust code example for using outbound MQTT from an HTTP component in the [Spin Rust SDK repository on GitHub](https://github.com/fermyon/spin-js-sdk/tree/main/examples/spin-host-apis/spin-mqtt).
77+
You can find a complete Rust code example for using outbound MQTT from an HTTP component in the [Spin Rust SDK repository on GitHub](https://github.com/fermyon/spin-js-sdk/tree/sdk-v2/examples/spin-host-apis/spin-mqtt).
7878

7979
{{ blockEnd }}
8080

content/spin/v2/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Note: The Rust templates are in a repo that contains several other languages; th
116116
<!-- @selectiveCpy -->
117117

118118
```bash
119-
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --update
119+
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --update --branch sdk-v2
120120
Copying remote template source
121121
Installing template http-js...
122122
Installing template http-ts...

content/spin/v2/rdbms-storage.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ url = "https://github.com/fermyon/developer/blob/main/content/spin/v2/rdbms-stor
88
---
99
- [Using MySQL and PostgreSQL From Applications](#using-mysql-and-postgresql-from-applications)
1010
- [Granting Network Permissions to Components](#granting-network-permissions-to-components)
11+
- [Configuration-Based Permissions](#configuration-based-permissions)
1112

1213
Spin provides two interfaces for relational (SQL) databases:
1314

@@ -72,7 +73,7 @@ For full information about the MySQL and PostgreSQL APIs, see [the Spin SDK refe
7273

7374
> [**Want to go straight to the reference documentation?** Find it here.](https://fermyon.github.io/spin-js-sdk/)
7475
75-
The code below is an [Outbound MySQL example](https://github.com/fermyon/spin-js-sdk/tree/main/examples/spin-host-apis/spin-mysql). There is also an outbound [PostgreSQL example](https://github.com/fermyon/spin-js-sdk/tree/main/examples/spin-host-apis/spin-postgres) available.
76+
The code below is an [Outbound MySQL example](https://github.com/fermyon/spin-js-sdk/tree/sdk-v2/examples/spin-host-apis/spin-mysql). There is also an outbound [PostgreSQL example](https://github.com/fermyon/spin-js-sdk/tree/sdk-v2/examples/spin-host-apis/spin-postgres) available.
7677

7778
```ts
7879
import { ResponseBuilder, Mysql } from '@fermyon/spin-sdk';

content/spin/v2/redis-outbound.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ let value = db.get(key);
109109

110110
* The arguments and results can be either numbers or buffers. (In TypeScript they are union types, e.g. `BigInt | Uint8Array`.)
111111

112-
You can find a complete TypeScript example for using outbound Redis from an HTTP component in the [JavaScript SDK repository on GitHub](https://github.com/fermyon/spin-js-sdk/tree/main/examples/spin-host-apis/spin-redis). Please also see this, related, [outbound Redis (using TypeScript) section](./javascript-components#storing-data-in-redis-from-jsts-components).
112+
You can find a complete TypeScript example for using outbound Redis from an HTTP component in the [JavaScript SDK repository on GitHub](https://github.com/fermyon/spin-js-sdk/tree/sdk-v2/examples/spin-host-apis/spin-redis). Please also see this, related, [outbound Redis (using TypeScript) section](./javascript-components#storing-data-in-redis-from-jsts-components).
113113

114114
{{ blockEnd }}
115115

content/spin/v2/serverless-ai-hello-world.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To enable Serverless AI functionality via TypeScript/Javascript, please ensure y
5050
<!-- @selectiveCpy -->
5151

5252
```bash
53-
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --upgrade
53+
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --upgrade --branch sdk-v2
5454
```
5555

5656
**Python**

0 commit comments

Comments
 (0)